diff options
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/handlers/merge_imports.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs index 89bc975bd..c57a8466f 100644 --- a/crates/ra_assists/src/handlers/merge_imports.rs +++ b/crates/ra_assists/src/handlers/merge_imports.rs | |||
@@ -182,4 +182,22 @@ use std::{fmt<|>::{Display, Debug}}; | |||
182 | ", | 182 | ", |
183 | ); | 183 | ); |
184 | } | 184 | } |
185 | |||
186 | #[test] | ||
187 | fn removes_just_enough_whitespace() { | ||
188 | check_assist( | ||
189 | merge_imports, | ||
190 | r" | ||
191 | use foo<|>::bar; | ||
192 | use foo::baz; | ||
193 | |||
194 | /// Doc comment | ||
195 | ", | ||
196 | r" | ||
197 | use foo<|>::{bar, baz}; | ||
198 | |||
199 | /// Doc comment | ||
200 | ", | ||
201 | ); | ||
202 | } | ||
185 | } | 203 | } |