Skip to content

Commit dfbe967

Browse files
committed
Move imports locator to ide_db
1 parent ec23030 commit dfbe967

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

crates/ra_ide/src/assists.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
use either::Either;
44
use ra_assists::{AssistAction, AssistLabel};
55
use ra_db::{FilePosition, FileRange};
6-
use ra_ide_db::RootDatabase;
6+
use ra_ide_db::{imports_locator::ImportsLocatorIde, RootDatabase};
77

8-
use crate::{imports_locator::ImportsLocatorIde, FileId, SourceChange, SourceFileEdit};
8+
use crate::{FileId, SourceChange, SourceFileEdit};
99

1010
pub use ra_assists::AssistId;
1111

crates/ra_ide/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ mod syntax_highlighting;
2626
mod parent_module;
2727
mod references;
2828
mod impls;
29-
mod imports_locator;
3029
mod assists;
3130
mod diagnostics;
3231
mod syntax_tree;

crates/ra_ide/src/imports_locator.rs renamed to crates/ra_ide_db/src/imports_locator.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
44
use hir::{db::HirDatabase, ModuleDef, SourceBinder};
55
use ra_assists::ImportsLocator;
6-
use ra_ide_db::{
7-
defs::NameKind,
8-
symbol_index::{self, FileSymbol},
9-
RootDatabase,
10-
};
116
use ra_prof::profile;
127
use ra_syntax::{ast, AstNode, SyntaxKind::NAME};
138

14-
use crate::{references::classify_name, Query};
9+
use crate::{
10+
defs::classify_name,
11+
defs::NameKind,
12+
symbol_index::{self, FileSymbol, Query},
13+
RootDatabase,
14+
};
1515

16-
pub(crate) struct ImportsLocatorIde<'a> {
16+
pub struct ImportsLocatorIde<'a> {
1717
source_binder: SourceBinder<'a, RootDatabase>,
1818
}
1919

2020
impl<'a> ImportsLocatorIde<'a> {
21-
pub(crate) fn new(db: &'a RootDatabase) -> Self {
21+
pub fn new(db: &'a RootDatabase) -> Self {
2222
Self { source_binder: SourceBinder::new(db) }
2323
}
2424

crates/ra_ide_db/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub mod feature_flags;
88
pub mod symbol_index;
99
pub mod change;
1010
pub mod defs;
11+
pub mod imports_locator;
1112
mod wasm_shims;
1213

1314
use std::sync::Arc;

0 commit comments

Comments
 (0)