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_hir_ty | |
parent | f632727b2ab985a9c5ceca781d033a08ee3822ea (diff) |
Make relevant_crates return a Set
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/src/test_db.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs index e484968a0..ad04e3e0f 100644 --- a/crates/ra_hir_ty/src/test_db.rs +++ b/crates/ra_hir_ty/src/test_db.rs | |||
@@ -8,6 +8,7 @@ use std::{ | |||
8 | use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId}; | 8 | use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId}; |
9 | use hir_expand::{db::AstDatabase, diagnostics::DiagnosticSink}; | 9 | use hir_expand::{db::AstDatabase, diagnostics::DiagnosticSink}; |
10 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; | 10 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; |
11 | use rustc_hash::FxHashSet; | ||
11 | use stdx::format_to; | 12 | use stdx::format_to; |
12 | 13 | ||
13 | use crate::{db::HirDatabase, diagnostics::Diagnostic, expr::ExprValidator}; | 14 | use crate::{db::HirDatabase, diagnostics::Diagnostic, expr::ExprValidator}; |
@@ -73,7 +74,7 @@ impl FileLoader for TestDB { | |||
73 | fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> { | 74 | fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> { |
74 | FileLoaderDelegate(self).resolve_path(anchor, path) | 75 | FileLoaderDelegate(self).resolve_path(anchor, path) |
75 | } | 76 | } |
76 | fn relevant_crates(&self, file_id: FileId) -> Arc<Vec<CrateId>> { | 77 | fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> { |
77 | FileLoaderDelegate(self).relevant_crates(file_id) | 78 | FileLoaderDelegate(self).relevant_crates(file_id) |
78 | } | 79 | } |
79 | } | 80 | } |