]> git.lizzy.rs Git - rust.git/commitdiff
Remove query aliases
authorKirill Bulatov <mail4score@gmail.com>
Mon, 16 Nov 2020 19:24:54 +0000 (21:24 +0200)
committerKirill Bulatov <mail4score@gmail.com>
Mon, 16 Nov 2020 19:24:54 +0000 (21:24 +0200)
crates/completion/src/completions/unqualified_path.rs
crates/hir/src/lib.rs
crates/ide_db/src/imports_locator.rs

index 362d31f2550b4aa14dfb51e034cb081ccace8767..4f8ec1e6756c756d40a076d93c2dcd716993c79e 100644 (file)
@@ -72,7 +72,7 @@ fn complete_enum_variants(acc: &mut Completions, ctx: &CompletionContext, ty: &T
 }
 
 fn fuzzy_completion(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
-    let _p = profile::span("fuzzy_completion®");
+    let _p = profile::span("fuzzy_completion");
     let current_module = ctx.scope.module()?;
     let anchor = ctx.name_ref_syntax.as_ref()?;
     let import_scope = ImportScope::find_insert_use_container(anchor.syntax(), &ctx.sema)?;
index 4b7ea3aa9f6868d598bc01ef0de7ec73e72d0b43..5fea25ef1b710b7e732e0a0c99196757fbc29e92 100644 (file)
@@ -49,7 +49,7 @@
     builtin_type::BuiltinType,
     docs::Documentation,
     find_path::PrefixKind,
-    import_map::Query as ExternalImportablesQuery,
+    import_map,
     item_scope::ItemInNs,
     nameres::ModuleSource,
     path::{ModPath, PathKind},
index 1b21f76ac9b303653f1812a1393bedf7041ab4bd..9d8ea7368d3a5141ae14dff7d03f18b45917e3a7 100644 (file)
@@ -1,12 +1,12 @@
 //! This module contains an import search funcionality that is provided to the assists module.
 //! Later, this should be moved away to a separate crate that is accessible from the assists module.
 
-use hir::{Crate, ExternalImportablesQuery, MacroDef, ModuleDef, Semantics};
+use hir::{import_map, Crate, MacroDef, ModuleDef, Semantics};
 use syntax::{ast, AstNode, SyntaxKind::NAME};
 
 use crate::{
     defs::{Definition, NameClass},
-    symbol_index::{self, FileSymbol, Query as LocalImportablesQuery},
+    symbol_index::{self, FileSymbol},
     RootDatabase,
 };
 use either::Either;
@@ -22,12 +22,12 @@ pub fn find_exact_imports<'a>(
         sema,
         krate,
         {
-            let mut local_query = LocalImportablesQuery::new(name_to_import.to_string());
+            let mut local_query = symbol_index::Query::new(name_to_import.to_string());
             local_query.exact();
             local_query.limit(40);
             local_query
         },
-        ExternalImportablesQuery::new(name_to_import).anchor_end().case_sensitive().limit(40),
+        import_map::Query::new(name_to_import).anchor_end().case_sensitive().limit(40),
     )
 }
 
@@ -42,19 +42,19 @@ pub fn find_similar_imports<'a>(
         sema,
         krate,
         {
-            let mut local_query = LocalImportablesQuery::new(name_to_import.to_string());
+            let mut local_query = symbol_index::Query::new(name_to_import.to_string());
             local_query.limit(limit);
             local_query
         },
-        ExternalImportablesQuery::new(name_to_import).limit(limit),
+        import_map::Query::new(name_to_import).limit(limit),
     )
 }
 
 fn find_imports<'a>(
     sema: &Semantics<'a, RootDatabase>,
     krate: Crate,
-    local_query: LocalImportablesQuery,
-    external_query: ExternalImportablesQuery,
+    local_query: symbol_index::Query,
+    external_query: import_map::Query,
 ) -> impl Iterator<Item = Either<ModuleDef, MacroDef>> {
     let _p = profile::span("find_similar_imports");
     let db = sema.db;