diff options
Diffstat (limited to 'crates/ra_ide_api/src/references')
-rw-r--r-- | crates/ra_ide_api/src/references/search_scope.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/references/search_scope.rs b/crates/ra_ide_api/src/references/search_scope.rs index dbd1af597..f2789e0b2 100644 --- a/crates/ra_ide_api/src/references/search_scope.rs +++ b/crates/ra_ide_api/src/references/search_scope.rs | |||
@@ -111,8 +111,7 @@ impl NameDefinition { | |||
111 | if vis.as_str() != "" { | 111 | if vis.as_str() != "" { |
112 | let source_root_id = db.file_source_root(file_id); | 112 | let source_root_id = db.file_source_root(file_id); |
113 | let source_root = db.source_root(source_root_id); | 113 | let source_root = db.source_root(source_root_id); |
114 | let mut res = | 114 | let mut res = source_root.walk().map(|id| (id, None)).collect::<FxHashMap<_, _>>(); |
115 | source_root.walk().map(|id| (id.into(), None)).collect::<FxHashMap<_, _>>(); | ||
116 | 115 | ||
117 | // FIXME: add "pub(in path)" | 116 | // FIXME: add "pub(in path)" |
118 | 117 | ||
@@ -128,7 +127,7 @@ impl NameDefinition { | |||
128 | let root_file = crate_graph.crate_root(crate_id); | 127 | let root_file = crate_graph.crate_root(crate_id); |
129 | let source_root_id = db.file_source_root(root_file); | 128 | let source_root_id = db.file_source_root(root_file); |
130 | let source_root = db.source_root(source_root_id); | 129 | let source_root = db.source_root(source_root_id); |
131 | res.extend(source_root.walk().map(|id| (id.into(), None))); | 130 | res.extend(source_root.walk().map(|id| (id, None))); |
132 | } | 131 | } |
133 | } | 132 | } |
134 | return SearchScope::new(res); | 133 | return SearchScope::new(res); |