diff options
-rw-r--r-- | crates/ra_assists/src/handlers/add_custom_impl.rs | 4 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/add_impl.rs | 1 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/add_new.rs | 3 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/auto_import.rs | 14 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/fill_match_arms.rs | 2 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/invert_if.rs | 6 |
6 files changed, 17 insertions, 13 deletions
diff --git a/crates/ra_assists/src/handlers/add_custom_impl.rs b/crates/ra_assists/src/handlers/add_custom_impl.rs index 74aa4b001..dd2bed25a 100644 --- a/crates/ra_assists/src/handlers/add_custom_impl.rs +++ b/crates/ra_assists/src/handlers/add_custom_impl.rs | |||
@@ -1,7 +1,5 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use crate::{Assist, AssistCtx, AssistId}; | ||
4 | |||
5 | use join_to_string::join; | 3 | use join_to_string::join; |
6 | use ra_syntax::{ | 4 | use ra_syntax::{ |
7 | ast::{self, AstNode}, | 5 | ast::{self, AstNode}, |
@@ -10,6 +8,8 @@ use ra_syntax::{ | |||
10 | TextRange, TextUnit, | 8 | TextRange, TextUnit, |
11 | }; | 9 | }; |
12 | 10 | ||
11 | use crate::{Assist, AssistCtx, AssistId}; | ||
12 | |||
13 | const DERIVE_TRAIT: &str = "derive"; | 13 | const DERIVE_TRAIT: &str = "derive"; |
14 | 14 | ||
15 | // Assist: add_custom_impl | 15 | // Assist: add_custom_impl |
diff --git a/crates/ra_assists/src/handlers/add_impl.rs b/crates/ra_assists/src/handlers/add_impl.rs index 241b085fd..afae7d385 100644 --- a/crates/ra_assists/src/handlers/add_impl.rs +++ b/crates/ra_assists/src/handlers/add_impl.rs | |||
@@ -1,5 +1,4 @@ | |||
1 | use format_buf::format; | 1 | use format_buf::format; |
2 | |||
3 | use join_to_string::join; | 2 | use join_to_string::join; |
4 | use ra_syntax::{ | 3 | use ra_syntax::{ |
5 | ast::{self, AstNode, NameOwner, TypeParamsOwner}, | 4 | ast::{self, AstNode, NameOwner, TypeParamsOwner}, |
diff --git a/crates/ra_assists/src/handlers/add_new.rs b/crates/ra_assists/src/handlers/add_new.rs index 697e7cda6..729a223e0 100644 --- a/crates/ra_assists/src/handlers/add_new.rs +++ b/crates/ra_assists/src/handlers/add_new.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | use std::fmt::Write; | ||
2 | |||
1 | use format_buf::format; | 3 | use format_buf::format; |
2 | use hir::Adt; | 4 | use hir::Adt; |
3 | use join_to_string::join; | 5 | use join_to_string::join; |
@@ -7,7 +9,6 @@ use ra_syntax::{ | |||
7 | }, | 9 | }, |
8 | TextUnit, T, | 10 | TextUnit, T, |
9 | }; | 11 | }; |
10 | use std::fmt::Write; | ||
11 | 12 | ||
12 | use crate::{Assist, AssistCtx, AssistId}; | 13 | use crate::{Assist, AssistCtx, AssistId}; |
13 | 14 | ||
diff --git a/crates/ra_assists/src/handlers/auto_import.rs b/crates/ra_assists/src/handlers/auto_import.rs index 4b62aac48..bb280f633 100644 --- a/crates/ra_assists/src/handlers/auto_import.rs +++ b/crates/ra_assists/src/handlers/auto_import.rs | |||
@@ -1,8 +1,5 @@ | |||
1 | use crate::{ | 1 | use std::collections::BTreeSet; |
2 | assist_ctx::{Assist, AssistCtx}, | 2 | |
3 | utils::insert_use_statement, | ||
4 | AssistId, | ||
5 | }; | ||
6 | use hir::{ | 3 | use hir::{ |
7 | AsAssocItem, AssocItemContainer, ModPath, Module, ModuleDef, PathResolution, Semantics, Trait, | 4 | AsAssocItem, AssocItemContainer, ModPath, Module, ModuleDef, PathResolution, Semantics, Trait, |
8 | Type, | 5 | Type, |
@@ -14,7 +11,12 @@ use ra_syntax::{ | |||
14 | SyntaxNode, | 11 | SyntaxNode, |
15 | }; | 12 | }; |
16 | use rustc_hash::FxHashSet; | 13 | use rustc_hash::FxHashSet; |
17 | use std::collections::BTreeSet; | 14 | |
15 | use crate::{ | ||
16 | assist_ctx::{Assist, AssistCtx}, | ||
17 | utils::insert_use_statement, | ||
18 | AssistId, | ||
19 | }; | ||
18 | 20 | ||
19 | // Assist: auto_import | 21 | // Assist: auto_import |
20 | // | 22 | // |
diff --git a/crates/ra_assists/src/handlers/fill_match_arms.rs b/crates/ra_assists/src/handlers/fill_match_arms.rs index 97cf90ae4..a1e4c2eb7 100644 --- a/crates/ra_assists/src/handlers/fill_match_arms.rs +++ b/crates/ra_assists/src/handlers/fill_match_arms.rs | |||
@@ -3,10 +3,10 @@ | |||
3 | use std::iter; | 3 | use std::iter; |
4 | 4 | ||
5 | use hir::{Adt, HasSource, Semantics}; | 5 | use hir::{Adt, HasSource, Semantics}; |
6 | use ra_ide_db::RootDatabase; | ||
6 | use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner}; | 7 | use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner}; |
7 | 8 | ||
8 | use crate::{Assist, AssistCtx, AssistId}; | 9 | use crate::{Assist, AssistCtx, AssistId}; |
9 | use ra_ide_db::RootDatabase; | ||
10 | 10 | ||
11 | // Assist: fill_match_arms | 11 | // Assist: fill_match_arms |
12 | // | 12 | // |
diff --git a/crates/ra_assists/src/handlers/invert_if.rs b/crates/ra_assists/src/handlers/invert_if.rs index a594e7e0c..3a2665d17 100644 --- a/crates/ra_assists/src/handlers/invert_if.rs +++ b/crates/ra_assists/src/handlers/invert_if.rs | |||
@@ -1,5 +1,7 @@ | |||
1 | use ra_syntax::ast::{self, AstNode}; | 1 | use ra_syntax::{ |
2 | use ra_syntax::T; | 2 | ast::{self, AstNode}, |
3 | T, | ||
4 | }; | ||
3 | 5 | ||
4 | use crate::{utils::invert_boolean_expression, Assist, AssistCtx, AssistId}; | 6 | use crate::{utils::invert_boolean_expression, Assist, AssistCtx, AssistId}; |
5 | 7 | ||