Skip to content

Commit 481dcb0

Browse files
committed
jsondoclint: apply considerable clippy suggestions
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 4a7c138 commit 481dcb0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/tools/jsondoclint/src/validator.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -418,15 +418,13 @@ impl<'a> Validator<'a> {
418418
} else {
419419
self.fail_expecting(id, expected);
420420
}
421-
} else {
422-
if !self.missing_ids.contains(id) {
423-
self.missing_ids.insert(id);
421+
} else if !self.missing_ids.contains(id) {
422+
self.missing_ids.insert(id);
424423

425-
let sels = json_find::find_selector(&self.krate_json, &Value::String(id.0.clone()));
426-
assert_ne!(sels.len(), 0);
424+
let sels = json_find::find_selector(&self.krate_json, &Value::String(id.0.clone()));
425+
assert_ne!(sels.len(), 0);
427426

428-
self.fail(id, ErrorKind::NotFound(sels))
429-
}
427+
self.fail(id, ErrorKind::NotFound(sels))
430428
}
431429
}
432430

0 commit comments

Comments
 (0)