Replace map_or(false, _) with is_some_and(_) (#17074)

# Objective

Replace `map_or(false, _)` with `is_some_and(_)`
This commit is contained in:
ickshonpe 2024-12-31 21:13:13 +00:00 committed by GitHub
parent 7a5a734452
commit 9b4e6b345f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -920,7 +920,7 @@ macro_rules! impl_reflect_for_hashset {
from_reflect = V::from_reflect(value);
from_reflect.as_ref()
})
.map_or(false, |value| self.remove(value))
.is_some_and(|value| self.remove(value))
}
fn contains(&self, value: &dyn PartialReflect) -> bool {
@ -931,7 +931,7 @@ macro_rules! impl_reflect_for_hashset {
from_reflect = V::from_reflect(value);
from_reflect.as_ref()
})
.map_or(false, |value| self.contains(value))
.is_some_and(|value| self.contains(value))
}
}