Run clippy --fix
for unnecessary_map_or
lint
This commit is contained in:
parent
39dc268459
commit
264fa0fc54
39 changed files with 61 additions and 67 deletions
|
@ -794,7 +794,7 @@ impl<Id> Res<Id> {
|
|||
|
||||
/// Always returns `true` if `self` is `Res::Err`
|
||||
pub fn matches_ns(&self, ns: Namespace) -> bool {
|
||||
self.ns().map_or(true, |actual_ns| actual_ns == ns)
|
||||
self.ns().is_none_or(|actual_ns| actual_ns == ns)
|
||||
}
|
||||
|
||||
/// Returns whether such a resolved path can occur in a tuple struct/variant pattern
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue