Skip to content

Commit ea47bce

Browse files
committed
jsondoclint: apply considerable clippy suggestions
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 2715ba1 commit ea47bce

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
@@ -415,15 +415,13 @@ impl<'a> Validator<'a> {
415415
} else {
416416
self.fail_expecting(id, expected);
417417
}
418-
} else {
419-
if !self.missing_ids.contains(id) {
420-
self.missing_ids.insert(id);
418+
} else if !self.missing_ids.contains(id) {
419+
self.missing_ids.insert(id);
421420

422-
let sels = json_find::find_selector(&self.krate_json, &Value::String(id.0.clone()));
423-
assert_ne!(sels.len(), 0);
421+
let sels = json_find::find_selector(&self.krate_json, &Value::String(id.0.clone()));
422+
assert_ne!(sels.len(), 0);
424423

425-
self.fail(id, ErrorKind::NotFound(sels))
426-
}
424+
self.fail(id, ErrorKind::NotFound(sels))
427425
}
428426
}
429427

0 commit comments

Comments
 (0)