Skip to content

Commit 9391f57

Browse files
Fix clippy lints in rustapi-openapi
- Collapsed nested `if` statement in `crates/rustapi-openapi/src/spec.rs` to satisfy `clippy::collapsible_if`. Co-authored-by: Tuntii <121901995+Tuntii@users.noreply.github.com>
1 parent 8406de9 commit 9391f57

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

crates/rustapi-openapi/src/spec.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,8 @@ impl OpenApiSpec {
158158

159159
// Helper to check a single ref
160160
let mut check_ref = |r: &str| {
161-
if r.starts_with("#/components/schemas/") {
162-
if !defined_schemas.contains(r) {
163-
missing_refs.push(r.to_string());
164-
}
161+
if r.starts_with("#/components/schemas/") && !defined_schemas.contains(r) {
162+
missing_refs.push(r.to_string());
165163
}
166164
// Ignore other refs for now (e.g. external or non-schema refs)
167165
};

0 commit comments

Comments
 (0)