diff options
author | IceSentry <[email protected]> | 2020-04-13 02:34:01 +0100 |
---|---|---|
committer | IceSentry <[email protected]> | 2020-04-13 02:34:01 +0100 |
commit | 2e279ca031a52e90cd19dff513ee9d5b80cee8aa (patch) | |
tree | 3b21099ba2ec99f988821f455d91b52d2c1d3702 /crates/ra_assists/src | |
parent | abdf725c558f860b47883a6843bfd2a5a7c633bd (diff) |
Generalize test and clean up imports
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/handlers/merge_imports.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs index ab1fb2a0b..b3101f3ab 100644 --- a/crates/ra_assists/src/handlers/merge_imports.rs +++ b/crates/ra_assists/src/handlers/merge_imports.rs | |||
@@ -3,8 +3,7 @@ use std::iter::successors; | |||
3 | use ra_syntax::{ | 3 | use ra_syntax::{ |
4 | algo::{neighbor, SyntaxRewriter}, | 4 | algo::{neighbor, SyntaxRewriter}, |
5 | ast::{self, edit::AstNodeEdit, make}, | 5 | ast::{self, edit::AstNodeEdit, make}, |
6 | AstNode, Direction, InsertPosition, NodeOrToken, SyntaxElement, SyntaxKind, SyntaxToken, Token, | 6 | AstNode, Direction, InsertPosition, NodeOrToken, SyntaxElement, T, |
7 | T, | ||
8 | }; | 7 | }; |
9 | 8 | ||
10 | use crate::{Assist, AssistCtx, AssistId}; | 9 | use crate::{Assist, AssistCtx, AssistId}; |
@@ -269,15 +268,15 @@ use { | |||
269 | check_assist( | 268 | check_assist( |
270 | merge_imports, | 269 | merge_imports, |
271 | r" | 270 | r" |
272 | use hyper::service::make_service_fn; | 271 | use foo::bar::baz; |
273 | use hyper::<|>{ | 272 | use foo::<|>{ |
274 | StatusCode, | 273 | FooBar, |
275 | }; | 274 | }; |
276 | ", | 275 | ", |
277 | r" | 276 | r" |
278 | use hyper::{<|> | 277 | use foo::{<|> |
279 | StatusCode, | 278 | FooBar, |
280 | service::make_service_fn}; | 279 | bar::baz}; |
281 | ", | 280 | ", |
282 | ) | 281 | ) |
283 | } | 282 | } |