diff options
author | Igor Aleksanov <[email protected]> | 2020-10-24 08:47:23 +0100 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-10-24 08:47:23 +0100 |
commit | 8d3d509af77756758cea14cc4939d099b4f95993 (patch) | |
tree | a9aa8cccf437facc9e7a300ce688cb727aa2a783 /crates/assists/src/handlers | |
parent | 4105378dc7479a3dbd39a4afb3eba67d083bd7f8 (diff) |
Remove dependency on 'assists' from 'completion' crate
Diffstat (limited to 'crates/assists/src/handlers')
4 files changed, 8 insertions, 7 deletions
diff --git a/crates/assists/src/handlers/add_missing_impl_members.rs b/crates/assists/src/handlers/add_missing_impl_members.rs index 4c400f287..b82fb30ad 100644 --- a/crates/assists/src/handlers/add_missing_impl_members.rs +++ b/crates/assists/src/handlers/add_missing_impl_members.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | use hir::HasSource; | 1 | use hir::HasSource; |
2 | use ide_db::traits::{get_missing_assoc_items, resolve_target_trait}; | ||
2 | use syntax::{ | 3 | use syntax::{ |
3 | ast::{ | 4 | ast::{ |
4 | self, | 5 | self, |
@@ -11,7 +12,7 @@ use syntax::{ | |||
11 | use crate::{ | 12 | use crate::{ |
12 | assist_context::{AssistContext, Assists}, | 13 | assist_context::{AssistContext, Assists}, |
13 | ast_transform::{self, AstTransform, QualifyPaths, SubstituteTypeParams}, | 14 | ast_transform::{self, AstTransform, QualifyPaths, SubstituteTypeParams}, |
14 | utils::{get_missing_assoc_items, render_snippet, resolve_target_trait, Cursor}, | 15 | utils::{render_snippet, Cursor}, |
15 | AssistId, AssistKind, | 16 | AssistId, AssistKind, |
16 | }; | 17 | }; |
17 | 18 | ||
diff --git a/crates/assists/src/handlers/replace_if_let_with_match.rs b/crates/assists/src/handlers/replace_if_let_with_match.rs index 79097621e..9a49c48c1 100644 --- a/crates/assists/src/handlers/replace_if_let_with_match.rs +++ b/crates/assists/src/handlers/replace_if_let_with_match.rs | |||
@@ -7,10 +7,8 @@ use syntax::{ | |||
7 | AstNode, | 7 | AstNode, |
8 | }; | 8 | }; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{utils::unwrap_trivial_block, AssistContext, AssistId, AssistKind, Assists}; |
11 | utils::{unwrap_trivial_block, TryEnum}, | 11 | use ide_db::ty_filter::TryEnum; |
12 | AssistContext, AssistId, AssistKind, Assists, | ||
13 | }; | ||
14 | 12 | ||
15 | // Assist: replace_if_let_with_match | 13 | // Assist: replace_if_let_with_match |
16 | // | 14 | // |
diff --git a/crates/assists/src/handlers/replace_let_with_if_let.rs b/crates/assists/src/handlers/replace_let_with_if_let.rs index ed6d0c29b..a5bcbda24 100644 --- a/crates/assists/src/handlers/replace_let_with_if_let.rs +++ b/crates/assists/src/handlers/replace_let_with_if_let.rs | |||
@@ -9,7 +9,8 @@ use syntax::{ | |||
9 | AstNode, T, | 9 | AstNode, T, |
10 | }; | 10 | }; |
11 | 11 | ||
12 | use crate::{utils::TryEnum, AssistContext, AssistId, AssistKind, Assists}; | 12 | use crate::{AssistContext, AssistId, AssistKind, Assists}; |
13 | use ide_db::ty_filter::TryEnum; | ||
13 | 14 | ||
14 | // Assist: replace_let_with_if_let | 15 | // Assist: replace_let_with_if_let |
15 | // | 16 | // |
diff --git a/crates/assists/src/handlers/replace_unwrap_with_match.rs b/crates/assists/src/handlers/replace_unwrap_with_match.rs index 4043c219c..f547066f0 100644 --- a/crates/assists/src/handlers/replace_unwrap_with_match.rs +++ b/crates/assists/src/handlers/replace_unwrap_with_match.rs | |||
@@ -10,9 +10,10 @@ use syntax::{ | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | utils::{render_snippet, Cursor, TryEnum}, | 13 | utils::{render_snippet, Cursor}, |
14 | AssistContext, AssistId, AssistKind, Assists, | 14 | AssistContext, AssistId, AssistKind, Assists, |
15 | }; | 15 | }; |
16 | use ide_db::ty_filter::TryEnum; | ||
16 | 17 | ||
17 | // Assist: replace_unwrap_with_match | 18 | // Assist: replace_unwrap_with_match |
18 | // | 19 | // |