aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-11-13 20:31:41 +0000
committerKirill Bulatov <[email protected]>2020-11-16 19:19:06 +0000
commit46514448b740b82e4f5f9cf742c6f8c6caec1d38 (patch)
tree3c0b226594c9a18e8d49d738d5c419a09cee25db /crates/ide_db
parent1598740292c29613ef2b384a82de3a2735bc5566 (diff)
Tweak the search limits a bit
Diffstat (limited to 'crates/ide_db')
-rw-r--r--crates/ide_db/src/imports_locator.rs5
1 files changed, 3 insertions, 2 deletions
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>(
35 sema: &Semantics<'a, RootDatabase>, 35 sema: &Semantics<'a, RootDatabase>,
36 krate: Crate, 36 krate: Crate,
37 name_to_import: &str, 37 name_to_import: &str,
38 limit: usize,
38) -> impl Iterator<Item = Either<ModuleDef, MacroDef>> { 39) -> impl Iterator<Item = Either<ModuleDef, MacroDef>> {
39 let _p = profile::span("find_similar_imports"); 40 let _p = profile::span("find_similar_imports");
40 find_imports( 41 find_imports(
@@ -42,10 +43,10 @@ pub fn find_similar_imports<'a>(
42 krate, 43 krate,
43 { 44 {
44 let mut local_query = LocalImportablesQuery::new(name_to_import.to_string()); 45 let mut local_query = LocalImportablesQuery::new(name_to_import.to_string());
45 local_query.limit(40); 46 local_query.limit(limit);
46 local_query 47 local_query
47 }, 48 },
48 ExternalImportablesQuery::new(name_to_import).limit(40), 49 ExternalImportablesQuery::new(name_to_import).limit(limit),
49 ) 50 )
50} 51}
51 52