diff options
author | kjeremy <[email protected]> | 2019-10-30 17:36:37 +0000 |
---|---|---|
committer | kjeremy <[email protected]> | 2019-10-30 17:36:37 +0000 |
commit | b441b4e8effeaf4532fd2e45c4d864480857c49e (patch) | |
tree | 5f25f7478b8ec365b2a2d5f7bea4ec2386bdd244 /crates/ra_ide_api/src/references | |
parent | 5806195bc1cdb1ca3fa257e99fd6e0dd897713a9 (diff) |
Some clippy fixes
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); |