aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-11-28 14:30:39 +0000
committerKirill Bulatov <[email protected]>2020-11-28 14:30:39 +0000
commit3f612d37c68a6e4c09e407b7cd2ad8a1d17ab4e6 (patch)
treee51b5ce814d08c79bd667719992c8b7254e4eb68 /crates/assists/src/handlers
parent7b145bd99c855b2f4a15835a2298dde504b04d8f (diff)
Move the helpers into ide_db
Diffstat (limited to 'crates/assists/src/handlers')
-rw-r--r--crates/assists/src/handlers/auto_import.rs2
-rw-r--r--crates/assists/src/handlers/extract_struct_from_enum_variant.rs6
-rw-r--r--crates/assists/src/handlers/fill_match_arms.rs4
-rw-r--r--crates/assists/src/handlers/generate_from_impl_for_enum.rs2
-rw-r--r--crates/assists/src/handlers/merge_imports.rs2
-rw-r--r--crates/assists/src/handlers/qualify_path.rs2
-rw-r--r--crates/assists/src/handlers/replace_derive_with_manual_impl.rs2
-rw-r--r--crates/assists/src/handlers/replace_qualified_name_with_use.rs2
8 files changed, 11 insertions, 11 deletions
diff --git a/crates/assists/src/handlers/auto_import.rs b/crates/assists/src/handlers/auto_import.rs
index 0b2d508d5..bd5bba646 100644
--- a/crates/assists/src/handlers/auto_import.rs
+++ b/crates/assists/src/handlers/auto_import.rs
@@ -1,4 +1,4 @@
1use ide_helpers::{ 1use ide_db::helpers::{
2 insert_use::{insert_use, ImportScope}, 2 insert_use::{insert_use, ImportScope},
3 mod_path_to_ast, 3 mod_path_to_ast,
4}; 4};
diff --git a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
index fddd5354a..d85767b4e 100644
--- a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
+++ b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
@@ -2,11 +2,11 @@ use std::iter;
2 2
3use either::Either; 3use either::Either;
4use hir::{AsName, EnumVariant, Module, ModuleDef, Name}; 4use hir::{AsName, EnumVariant, Module, ModuleDef, Name};
5use ide_db::{defs::Definition, search::Reference, RootDatabase}; 5use ide_db::helpers::{
6use ide_helpers::{
7 insert_use::{insert_use, ImportScope}, 6 insert_use::{insert_use, ImportScope},
8 mod_path_to_ast, 7 mod_path_to_ast,
9}; 8};
9use ide_db::{defs::Definition, search::Reference, RootDatabase};
10use rustc_hash::{FxHashMap, FxHashSet}; 10use rustc_hash::{FxHashMap, FxHashSet};
11use syntax::{ 11use syntax::{
12 algo::{find_node_at_offset, SyntaxRewriter}, 12 algo::{find_node_at_offset, SyntaxRewriter},
@@ -237,7 +237,7 @@ fn update_reference(
237 237
238#[cfg(test)] 238#[cfg(test)]
239mod tests { 239mod tests {
240 use ide_helpers::FamousDefs; 240 use ide_db::helpers::FamousDefs;
241 241
242 use crate::tests::{check_assist, check_assist_not_applicable}; 242 use crate::tests::{check_assist, check_assist_not_applicable};
243 243
diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs
index bd42e0f16..ef12ef0cf 100644
--- a/crates/assists/src/handlers/fill_match_arms.rs
+++ b/crates/assists/src/handlers/fill_match_arms.rs
@@ -1,8 +1,8 @@
1use std::iter; 1use std::iter;
2 2
3use hir::{Adt, HasSource, ModuleDef, Semantics}; 3use hir::{Adt, HasSource, ModuleDef, Semantics};
4use ide_db::helpers::{mod_path_to_ast, FamousDefs};
4use ide_db::RootDatabase; 5use ide_db::RootDatabase;
5use ide_helpers::{mod_path_to_ast, FamousDefs};
6use itertools::Itertools; 6use itertools::Itertools;
7use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; 7use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat};
8use test_utils::mark; 8use test_utils::mark;
@@ -213,7 +213,7 @@ fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> O
213 213
214#[cfg(test)] 214#[cfg(test)]
215mod tests { 215mod tests {
216 use ide_helpers::FamousDefs; 216 use ide_db::helpers::FamousDefs;
217 use test_utils::mark; 217 use test_utils::mark;
218 218
219 use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target}; 219 use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target};
diff --git a/crates/assists/src/handlers/generate_from_impl_for_enum.rs b/crates/assists/src/handlers/generate_from_impl_for_enum.rs
index 01b14d94d..3c374e5d9 100644
--- a/crates/assists/src/handlers/generate_from_impl_for_enum.rs
+++ b/crates/assists/src/handlers/generate_from_impl_for_enum.rs
@@ -1,5 +1,5 @@
1use ide_db::helpers::FamousDefs;
1use ide_db::RootDatabase; 2use ide_db::RootDatabase;
2use ide_helpers::FamousDefs;
3use syntax::ast::{self, AstNode, NameOwner}; 3use syntax::ast::{self, AstNode, NameOwner};
4use test_utils::mark; 4use test_utils::mark;
5 5
diff --git a/crates/assists/src/handlers/merge_imports.rs b/crates/assists/src/handlers/merge_imports.rs
index 8207f0e6e..b7e853994 100644
--- a/crates/assists/src/handlers/merge_imports.rs
+++ b/crates/assists/src/handlers/merge_imports.rs
@@ -1,4 +1,4 @@
1use ide_helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour}; 1use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour};
2use syntax::{ 2use syntax::{
3 algo::{neighbor, SyntaxRewriter}, 3 algo::{neighbor, SyntaxRewriter},
4 ast, AstNode, 4 ast, AstNode,
diff --git a/crates/assists/src/handlers/qualify_path.rs b/crates/assists/src/handlers/qualify_path.rs
index c0ee7ea0b..6f9810fe8 100644
--- a/crates/assists/src/handlers/qualify_path.rs
+++ b/crates/assists/src/handlers/qualify_path.rs
@@ -1,8 +1,8 @@
1use std::iter; 1use std::iter;
2 2
3use hir::AsName; 3use hir::AsName;
4use ide_db::helpers::mod_path_to_ast;
4use ide_db::RootDatabase; 5use ide_db::RootDatabase;
5use ide_helpers::mod_path_to_ast;
6use syntax::{ 6use syntax::{
7 ast, 7 ast,
8 ast::{make, ArgListOwner}, 8 ast::{make, ArgListOwner},
diff --git a/crates/assists/src/handlers/replace_derive_with_manual_impl.rs b/crates/assists/src/handlers/replace_derive_with_manual_impl.rs
index fe262377c..4d6a1956b 100644
--- a/crates/assists/src/handlers/replace_derive_with_manual_impl.rs
+++ b/crates/assists/src/handlers/replace_derive_with_manual_impl.rs
@@ -1,5 +1,5 @@
1use ide_db::helpers::mod_path_to_ast;
1use ide_db::imports_locator; 2use ide_db::imports_locator;
2use ide_helpers::mod_path_to_ast;
3use itertools::Itertools; 3use itertools::Itertools;
4use syntax::{ 4use syntax::{
5 ast::{self, make, AstNode}, 5 ast::{self, make, AstNode},
diff --git a/crates/assists/src/handlers/replace_qualified_name_with_use.rs b/crates/assists/src/handlers/replace_qualified_name_with_use.rs
index 5e5c41a6f..8bdf9eea5 100644
--- a/crates/assists/src/handlers/replace_qualified_name_with_use.rs
+++ b/crates/assists/src/handlers/replace_qualified_name_with_use.rs
@@ -1,4 +1,4 @@
1use ide_helpers::insert_use::{insert_use, ImportScope}; 1use ide_db::helpers::insert_use::{insert_use, ImportScope};
2use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SyntaxNode}; 2use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SyntaxNode};
3use test_utils::mark; 3use test_utils::mark;
4 4