From f4a4fcf2753f48b81873de5dc39c1159d2a88654 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 6 Feb 2020 19:27:48 +0200 Subject: Remove the leftovers after ImportLocator removal --- crates/ra_assists/src/assists/auto_import.rs | 4 ++-- crates/ra_hir/src/lib.rs | 1 - crates/ra_ide_db/src/imports_locator.rs | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'crates') diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs index f16b08c43..10c4b7d7c 100644 --- a/crates/ra_assists/src/assists/auto_import.rs +++ b/crates/ra_assists/src/assists/auto_import.rs @@ -8,7 +8,7 @@ use crate::{ assist_ctx::{ActionBuilder, Assist, AssistCtx}, auto_import_text_edit, AssistId, }; -use ra_ide_db::imports_locator::ImportsLocatorIde; +use ra_ide_db::imports_locator::ImportsLocator; // Assist: auto_import // @@ -52,7 +52,7 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option { return None; } - let mut imports_locator = ImportsLocatorIde::new(ctx.db); + let mut imports_locator = ImportsLocator::new(ctx.db); let proposed_imports = imports_locator .find_imports(&name_to_import) diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index ea06a4a58..86e422779 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs @@ -56,7 +56,6 @@ pub use hir_def::{ nameres::ModuleSource, path::{ModPath, Path, PathKind}, type_ref::Mutability, - ModuleDefId, // FIXME this is exposed and should be used for implementing the `TestImportsLocator` in `ra_assists` only, should be removed later along with the trait and the implementation. }; pub use hir_expand::{ name::{name, Name}, diff --git a/crates/ra_ide_db/src/imports_locator.rs b/crates/ra_ide_db/src/imports_locator.rs index d77fc53f3..401b8ac0b 100644 --- a/crates/ra_ide_db/src/imports_locator.rs +++ b/crates/ra_ide_db/src/imports_locator.rs @@ -12,11 +12,11 @@ use crate::{ RootDatabase, }; -pub struct ImportsLocatorIde<'a> { +pub struct ImportsLocator<'a> { source_binder: SourceBinder<'a, RootDatabase>, } -impl<'a> ImportsLocatorIde<'a> { +impl<'a> ImportsLocator<'a> { pub fn new(db: &'a RootDatabase) -> Self { Self { source_binder: SourceBinder::new(db) } } -- cgit v1.2.3