diff options
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/handlers/auto_import.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_assists/src/handlers/auto_import.rs b/crates/ra_assists/src/handlers/auto_import.rs index 9a366414c..2dcea3766 100644 --- a/crates/ra_assists/src/handlers/auto_import.rs +++ b/crates/ra_assists/src/handlers/auto_import.rs | |||
@@ -13,6 +13,7 @@ use hir::{ | |||
13 | AssocContainerId, AssocItem, Crate, Function, ModPath, Module, ModuleDef, PathResolution, | 13 | AssocContainerId, AssocItem, Crate, Function, ModPath, Module, ModuleDef, PathResolution, |
14 | SourceAnalyzer, Trait, Type, | 14 | SourceAnalyzer, Trait, Type, |
15 | }; | 15 | }; |
16 | use ra_prof::profile; | ||
16 | use rustc_hash::FxHashSet; | 17 | use rustc_hash::FxHashSet; |
17 | use std::collections::BTreeSet; | 18 | use std::collections::BTreeSet; |
18 | 19 | ||
@@ -123,6 +124,7 @@ impl AutoImportAssets { | |||
123 | db: &RootDatabase, | 124 | db: &RootDatabase, |
124 | module_with_name_to_import: Module, | 125 | module_with_name_to_import: Module, |
125 | ) -> BTreeSet<ModPath> { | 126 | ) -> BTreeSet<ModPath> { |
127 | let _p = profile("auto_import::search_for_imports"); | ||
126 | ImportsLocator::new(db) | 128 | ImportsLocator::new(db) |
127 | .find_imports(&self.get_search_query()) | 129 | .find_imports(&self.get_search_query()) |
128 | .into_iter() | 130 | .into_iter() |
@@ -207,6 +209,7 @@ impl AutoImportAssets { | |||
207 | called_function: Function, | 209 | called_function: Function, |
208 | root_crate: Crate, | 210 | root_crate: Crate, |
209 | ) -> FxHashSet<Trait> { | 211 | ) -> FxHashSet<Trait> { |
212 | let _p = profile("auto_import::get_trait_candidates"); | ||
210 | root_crate | 213 | root_crate |
211 | .dependencies(db) | 214 | .dependencies(db) |
212 | .into_iter() | 215 | .into_iter() |