From 46514448b740b82e4f5f9cf742c6f8c6caec1d38 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 13 Nov 2020 22:31:41 +0200 Subject: Tweak the search limits a bit --- crates/ide_db/src/imports_locator.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 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 71fb7207b..1b21f76ac 100644 --- a/crates/ide_db/src/imports_locator.rs +++ b/crates/ide_db/src/imports_locator.rs @@ -35,6 +35,7 @@ pub fn find_similar_imports<'a>( sema: &Semantics<'a, RootDatabase>, krate: Crate, name_to_import: &str, + limit: usize, ) -> impl Iterator> { let _p = profile::span("find_similar_imports"); find_imports( @@ -42,10 +43,10 @@ pub fn find_similar_imports<'a>( krate, { let mut local_query = LocalImportablesQuery::new(name_to_import.to_string()); - local_query.limit(40); + local_query.limit(limit); local_query }, - ExternalImportablesQuery::new(name_to_import).limit(40), + ExternalImportablesQuery::new(name_to_import).limit(limit), ) } -- cgit v1.2.3