Remove the leftovers after ImportLocator removal

This commit is contained in:
Kirill Bulatov 2020-02-06 19:27:48 +02:00
parent 46027e10be
commit f4a4fcf275
3 changed files with 4 additions and 5 deletions

View file

@ -8,7 +8,7 @@ use crate::{
assist_ctx::{ActionBuilder, Assist, AssistCtx}, assist_ctx::{ActionBuilder, Assist, AssistCtx},
auto_import_text_edit, AssistId, auto_import_text_edit, AssistId,
}; };
use ra_ide_db::imports_locator::ImportsLocatorIde; use ra_ide_db::imports_locator::ImportsLocator;
// Assist: auto_import // Assist: auto_import
// //
@ -52,7 +52,7 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> {
return None; return None;
} }
let mut imports_locator = ImportsLocatorIde::new(ctx.db); let mut imports_locator = ImportsLocator::new(ctx.db);
let proposed_imports = imports_locator let proposed_imports = imports_locator
.find_imports(&name_to_import) .find_imports(&name_to_import)

View file

@ -56,7 +56,6 @@ pub use hir_def::{
nameres::ModuleSource, nameres::ModuleSource,
path::{ModPath, Path, PathKind}, path::{ModPath, Path, PathKind},
type_ref::Mutability, 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::{ pub use hir_expand::{
name::{name, Name}, name::{name, Name},

View file

@ -12,11 +12,11 @@ use crate::{
RootDatabase, RootDatabase,
}; };
pub struct ImportsLocatorIde<'a> { pub struct ImportsLocator<'a> {
source_binder: SourceBinder<'a, RootDatabase>, source_binder: SourceBinder<'a, RootDatabase>,
} }
impl<'a> ImportsLocatorIde<'a> { impl<'a> ImportsLocator<'a> {
pub fn new(db: &'a RootDatabase) -> Self { pub fn new(db: &'a RootDatabase) -> Self {
Self { source_binder: SourceBinder::new(db) } Self { source_binder: SourceBinder::new(db) }
} }