clippy::complexity fixes
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
This commit is contained in:
@@ -103,12 +103,7 @@ impl EffectiveVisibilities {
|
||||
|
||||
pub fn public_at_level(&self, id: LocalDefId) -> Option<Level> {
|
||||
self.effective_vis(id).and_then(|effective_vis| {
|
||||
for level in Level::all_levels() {
|
||||
if effective_vis.is_public_at_level(level) {
|
||||
return Some(level);
|
||||
}
|
||||
}
|
||||
None
|
||||
Level::all_levels().into_iter().find(|&level| effective_vis.is_public_at_level(level))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user