From 3183ff3a7b1fbcf3cb5379cf162a3d769a21be7a Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 8 Dec 2020 00:46:56 +0200 Subject: Disable the completion for no corresponding client resolve capabilities --- crates/ide_db/src/imports_locator.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 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 09046d3c3..31151ce24 100644 --- a/crates/ide_db/src/imports_locator.rs +++ b/crates/ide_db/src/imports_locator.rs @@ -35,26 +35,16 @@ pub fn find_similar_imports<'a>( sema: &Semantics<'a, RootDatabase>, krate: Crate, name_to_import: &str, - limit: usize, ignore_modules: bool, ) -> impl Iterator> { let _p = profile::span("find_similar_imports"); - let mut external_query = import_map::Query::new(name_to_import).limit(limit); + let mut external_query = import_map::Query::new(name_to_import); if ignore_modules { external_query = external_query.exclude_import_kind(import_map::ImportKind::Module); } - find_imports( - sema, - krate, - { - let mut local_query = symbol_index::Query::new(name_to_import.to_string()); - local_query.limit(limit); - local_query - }, - external_query, - ) + find_imports(sema, krate, symbol_index::Query::new(name_to_import.to_string()), external_query) } fn find_imports<'a>( -- cgit v1.2.3