aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-05-12 21:05:45 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-05-12 21:05:45 +0100
commitb22614f0b500c351d3abf33a4ed6beaea6861bca (patch)
tree8e6cd37bc459cdb9444d482f74aa2455d06499b1 /crates/ra_hir/src/nameres.rs
parent0f57564f78207946fdb09e0cddc21a55966b1bc5 (diff)
parent9cba67b2ad0ef43b5c405f21f516c9ebee63a932 (diff)
Merge #1268
1268: simplify r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/nameres.rs')
-rw-r--r--crates/ra_hir/src/nameres.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index a450d7b84..0290b3474 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -272,8 +272,8 @@ impl CrateDefMap {
272 (res.resolved_def, res.segment_index) 272 (res.resolved_def, res.segment_index)
273 } 273 }
274 274
275 pub(crate) fn find_macro(&self, name: &Name) -> Option<&MacroDefId> { 275 pub(crate) fn find_macro(&self, name: &Name) -> Option<MacroDefId> {
276 self.public_macros.get(name).or(self.local_macros.get(name)) 276 self.public_macros.get(name).or(self.local_macros.get(name)).map(|it| *it)
277 } 277 }
278 278
279 // Returns Yes if we are sure that additions to `ItemMap` wouldn't change 279 // Returns Yes if we are sure that additions to `ItemMap` wouldn't change