From e4c3f753d23752a9fbb01bdf1cd92a8cb1f6681e Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 28 Dec 2020 14:54:31 +0200 Subject: Add docs and optimisations --- crates/ide_db/src/imports_locator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide_db/src') diff --git a/crates/ide_db/src/imports_locator.rs b/crates/ide_db/src/imports_locator.rs index 986cb5b83..b6355af4b 100644 --- a/crates/ide_db/src/imports_locator.rs +++ b/crates/ide_db/src/imports_locator.rs @@ -39,18 +39,18 @@ pub fn find_similar_imports<'a>( sema: &Semantics<'a, RootDatabase>, krate: Crate, limit: Option, - name_to_import: &str, + fuzzy_search_string: &str, name_only: bool, ) -> impl Iterator> { let _p = profile::span("find_similar_imports"); let mut external_query = - import_map::Query::new(name_to_import).search_mode(import_map::SearchMode::Fuzzy); + import_map::Query::new(fuzzy_search_string).search_mode(import_map::SearchMode::Fuzzy); if name_only { external_query = external_query.name_only(); } - let mut local_query = symbol_index::Query::new(name_to_import.to_string()); + let mut local_query = symbol_index::Query::new(fuzzy_search_string.to_string()); if let Some(limit) = limit { local_query.limit(limit); -- cgit v1.2.3