diff options
author | Aleksey Kladov <[email protected]> | 2020-06-11 10:30:06 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-11 10:30:06 +0100 |
commit | d8a5d39c2d05fb59b6c243935111714e18334599 (patch) | |
tree | 9fed314df9599ba26df698c1d38a4d727f21481d /crates/ra_ide_db/src | |
parent | f632727b2ab985a9c5ceca781d033a08ee3822ea (diff) |
Make relevant_crates return a Set
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r-- | crates/ra_ide_db/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_db/src/lib.rs b/crates/ra_ide_db/src/lib.rs index 727d743b5..480fd4576 100644 --- a/crates/ra_ide_db/src/lib.rs +++ b/crates/ra_ide_db/src/lib.rs | |||
@@ -19,7 +19,7 @@ use ra_db::{ | |||
19 | Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, | 19 | Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, |
20 | SourceRootId, Upcast, | 20 | SourceRootId, Upcast, |
21 | }; | 21 | }; |
22 | use rustc_hash::FxHashMap; | 22 | use rustc_hash::{FxHashMap, FxHashSet}; |
23 | 23 | ||
24 | use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase}; | 24 | use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase}; |
25 | 25 | ||
@@ -60,7 +60,7 @@ impl FileLoader for RootDatabase { | |||
60 | fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> { | 60 | fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> { |
61 | FileLoaderDelegate(self).resolve_path(anchor, path) | 61 | FileLoaderDelegate(self).resolve_path(anchor, path) |
62 | } | 62 | } |
63 | fn relevant_crates(&self, file_id: FileId) -> Arc<Vec<CrateId>> { | 63 | fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> { |
64 | FileLoaderDelegate(self).relevant_crates(file_id) | 64 | FileLoaderDelegate(self).relevant_crates(file_id) |
65 | } | 65 | } |
66 | } | 66 | } |