about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml1
-rw-r--r--crates/hir-def/src/nameres/collector.rs4
2 files changed, 2 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 4086b124541..f723e08b171 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -179,7 +179,6 @@ needless_doctest_main = "allow"
 new_without_default = "allow"
 non_canonical_clone_impl = "allow"
 non_canonical_partial_ord_impl = "allow"
-option_map_unit_fn = "allow"
 partialeq_to_none = "allow"
 ptr_arg = "allow"
 redundant_closure = "allow"
diff --git a/crates/hir-def/src/nameres/collector.rs b/crates/hir-def/src/nameres/collector.rs
index 2d323733714..1c0f4d4d35f 100644
--- a/crates/hir-def/src/nameres/collector.rs
+++ b/crates/hir-def/src/nameres/collector.rs
@@ -2371,9 +2371,9 @@ impl ModCollector<'_, '_> {
         };
 
         for (name, macs) in source.scope.legacy_macros() {
-            macs.last().map(|&mac| {
+            if let Some(&mac) = macs.last() {
                 target.scope.define_legacy_macro(name.clone(), mac);
-            });
+            }
         }
     }