We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bb8adb commit eb95be7Copy full SHA for eb95be7
src/haystack/defs/namespace.rs
@@ -429,7 +429,7 @@ impl Namespace {
429
Value::Symbol(sym) => self.get(sym),
430
_ => None,
431
})
432
- .filter(|target| inheritance.map_or(false, |s| s.contains(target.def_symbol())))
+ .filter(|target| inheritance.is_some_and(|s| s.contains(target.def_symbol())))
433
.for_each(|_| {
434
matches.insert(def);
435
});
@@ -569,7 +569,7 @@ impl Namespace {
569
pub fn fits(&self, def: &Symbol, base_def: &Symbol) -> bool {
570
self.inheritance_map
571
.get(def)
572
- .map_or(false, |s| s.contains(base_def))
+ .is_some_and(|s| s.contains(base_def))
573
}
574
575
/// Return true if the specified def is a marker.
0 commit comments