1
Fork 0

compiler: use is_none_or where it is clearly better

heuristic was: if it easily allows removing bangs entirely? worth it.
if it requires more effort or just moves the bang? not.
This commit is contained in:
Jubilee Young 2024-10-16 23:32:21 -07:00
parent dd5127615a
commit 47cfaa6d87
2 changed files with 3 additions and 3 deletions

View file

@ -184,11 +184,11 @@ impl<'a, 'ra, 'tcx> UnusedImportCheckVisitor<'a, 'ra, 'tcx> {
// If the extern crate isn't in the extern prelude,
// there is no way it can be written as a `use`.
if !self
if self
.r
.extern_prelude
.get(&extern_crate.ident)
.is_some_and(|entry| !entry.introduced_by_item)
.is_none_or(|entry| entry.introduced_by_item)
{
continue;
}