From 2e279ca031a52e90cd19dff513ee9d5b80cee8aa Mon Sep 17 00:00:00 2001 From: IceSentry Date: Sun, 12 Apr 2020 21:34:01 -0400 Subject: Generalize test and clean up imports --- crates/ra_assists/src/handlers/merge_imports.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'crates/ra_assists/src/handlers') 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; use ra_syntax::{ algo::{neighbor, SyntaxRewriter}, ast::{self, edit::AstNodeEdit, make}, - AstNode, Direction, InsertPosition, NodeOrToken, SyntaxElement, SyntaxKind, SyntaxToken, Token, - T, + AstNode, Direction, InsertPosition, NodeOrToken, SyntaxElement, T, }; use crate::{Assist, AssistCtx, AssistId}; @@ -269,15 +268,15 @@ use { check_assist( merge_imports, r" -use hyper::service::make_service_fn; -use hyper::<|>{ - StatusCode, +use foo::bar::baz; +use foo::<|>{ + FooBar, }; ", r" -use hyper::{<|> - StatusCode, -service::make_service_fn}; +use foo::{<|> + FooBar, +bar::baz}; ", ) } -- cgit v1.2.3