Skip to content

Commit 3f612d3

Browse files
Move the helpers into ide_db
1 parent 7b145bd commit 3f612d3

27 files changed

+29
-70
lines changed

Cargo.lock

Lines changed: 1 addition & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/assists/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ profile = { path = "../profile", version = "0.0.0" }
2121
ide_db = { path = "../ide_db", version = "0.0.0" }
2222
hir = { path = "../hir", version = "0.0.0" }
2323
test_utils = { path = "../test_utils", version = "0.0.0" }
24-
ide_helpers = { path = "../ide_helpers", version = "0.0.0" }

crates/assists/src/assist_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! assists if we are allowed to.
66
77
use hir::PrefixKind;
8-
use ide_helpers::insert_use::MergeBehaviour;
8+
use ide_db::helpers::insert_use::MergeBehaviour;
99

1010
use crate::AssistKind;
1111

crates/assists/src/ast_transform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! `AstTransformer`s are functions that replace nodes in an AST and can be easily combined.
22
use hir::{HirDisplay, PathResolution, SemanticsScope};
3-
use ide_helpers::mod_path_to_ast;
3+
use ide_db::helpers::mod_path_to_ast;
44
use rustc_hash::FxHashMap;
55
use syntax::{
66
algo::SyntaxRewriter,

crates/assists/src/handlers/auto_import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use ide_helpers::{
1+
use ide_db::helpers::{
22
insert_use::{insert_use, ImportScope},
33
mod_path_to_ast,
44
};

crates/assists/src/handlers/extract_struct_from_enum_variant.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ use std::iter;
22

33
use either::Either;
44
use hir::{AsName, EnumVariant, Module, ModuleDef, Name};
5-
use ide_db::{defs::Definition, search::Reference, RootDatabase};
6-
use ide_helpers::{
5+
use ide_db::helpers::{
76
insert_use::{insert_use, ImportScope},
87
mod_path_to_ast,
98
};
9+
use ide_db::{defs::Definition, search::Reference, RootDatabase};
1010
use rustc_hash::{FxHashMap, FxHashSet};
1111
use syntax::{
1212
algo::{find_node_at_offset, SyntaxRewriter},
@@ -237,7 +237,7 @@ fn update_reference(
237237

238238
#[cfg(test)]
239239
mod tests {
240-
use ide_helpers::FamousDefs;
240+
use ide_db::helpers::FamousDefs;
241241

242242
use crate::tests::{check_assist, check_assist_not_applicable};
243243

crates/assists/src/handlers/fill_match_arms.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::iter;
22

33
use hir::{Adt, HasSource, ModuleDef, Semantics};
4+
use ide_db::helpers::{mod_path_to_ast, FamousDefs};
45
use ide_db::RootDatabase;
5-
use ide_helpers::{mod_path_to_ast, FamousDefs};
66
use itertools::Itertools;
77
use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat};
88
use test_utils::mark;
@@ -213,7 +213,7 @@ fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> O
213213

214214
#[cfg(test)]
215215
mod tests {
216-
use ide_helpers::FamousDefs;
216+
use ide_db::helpers::FamousDefs;
217217
use test_utils::mark;
218218

219219
use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target};

crates/assists/src/handlers/generate_from_impl_for_enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
use ide_db::helpers::FamousDefs;
12
use ide_db::RootDatabase;
2-
use ide_helpers::FamousDefs;
33
use syntax::ast::{self, AstNode, NameOwner};
44
use test_utils::mark;
55

crates/assists/src/handlers/merge_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use ide_helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour};
1+
use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour};
22
use syntax::{
33
algo::{neighbor, SyntaxRewriter},
44
ast, AstNode,

crates/assists/src/handlers/qualify_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::iter;
22

33
use hir::AsName;
4+
use ide_db::helpers::mod_path_to_ast;
45
use ide_db::RootDatabase;
5-
use ide_helpers::mod_path_to_ast;
66
use syntax::{
77
ast,
88
ast::{make, ArgListOwner},

0 commit comments

Comments
 (0)