We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e233d80 commit bb351deCopy full SHA for bb351de
src/librustc_hir/def.rs
@@ -464,6 +464,6 @@ impl<Id> Res<Id> {
464
465
/// Always returns `true` if `self` is `Res::Err`
466
pub fn matches_ns(&self, ns: Namespace) -> bool {
467
- self.ns().map(|actual_ns| actual_ns == ns).unwrap_or(true)
+ self.ns().map_or(true, |actual_ns| actual_ns == ns)
468
}
469
0 commit comments