aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/item_scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/item_scope.rs')
-rw-r--r--crates/ra_hir_def/src/item_scope.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs
index d74a1cef2..6e958ca75 100644
--- a/crates/ra_hir_def/src/item_scope.rs
+++ b/crates/ra_hir_def/src/item_scope.rs
@@ -138,7 +138,7 @@ impl ItemScope {
138 138
139 pub(crate) fn push_res(&mut self, name: Name, def: PerNs) -> bool { 139 pub(crate) fn push_res(&mut self, name: Name, def: PerNs) -> bool {
140 let mut changed = false; 140 let mut changed = false;
141 let existing = self.visible.entry(name.clone()).or_default(); 141 let existing = self.visible.entry(name).or_default();
142 142
143 if existing.types.is_none() && def.types.is_some() { 143 if existing.types.is_none() && def.types.is_some() {
144 existing.types = def.types; 144 existing.types = def.types;
@@ -157,7 +157,7 @@ impl ItemScope {
157 } 157 }
158 158
159 pub(crate) fn resolutions<'a>(&'a self) -> impl Iterator<Item = (Name, PerNs)> + 'a { 159 pub(crate) fn resolutions<'a>(&'a self) -> impl Iterator<Item = (Name, PerNs)> + 'a {
160 self.visible.iter().map(|(name, res)| (name.clone(), res.clone())) 160 self.visible.iter().map(|(name, res)| (name.clone(), *res))
161 } 161 }
162 162
163 pub(crate) fn collect_legacy_macros(&self) -> FxHashMap<Name, MacroDefId> { 163 pub(crate) fn collect_legacy_macros(&self) -> FxHashMap<Name, MacroDefId> {