diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 13:18:41 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 13:18:41 +0100 |
commit | 51b18ee2f1c3c9f7ea58c5f00b451e683048f618 (patch) | |
tree | 1152a079401b2d34bcc903f7935fe1aff0b7b3db /crates/ra_assists/src/handlers/merge_imports.rs | |
parent | 9042009b7f1ba0f85e892ac5184fa4542d0c10f5 (diff) | |
parent | 02cac962e133d420485bc7b64698902dcc26a5e7 (diff) |
Merge #5587
5587: Finish use grammar r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers/merge_imports.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/merge_imports.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs index 1beccb61c..c775fe25c 100644 --- a/crates/ra_assists/src/handlers/merge_imports.rs +++ b/crates/ra_assists/src/handlers/merge_imports.rs | |||
@@ -28,7 +28,7 @@ pub(crate) fn merge_imports(acc: &mut Assists, ctx: &AssistContext) -> Option<() | |||
28 | let mut rewriter = SyntaxRewriter::default(); | 28 | let mut rewriter = SyntaxRewriter::default(); |
29 | let mut offset = ctx.offset(); | 29 | let mut offset = ctx.offset(); |
30 | 30 | ||
31 | if let Some(use_item) = tree.syntax().parent().and_then(ast::UseItem::cast) { | 31 | if let Some(use_item) = tree.syntax().parent().and_then(ast::Use::cast) { |
32 | let (merged, to_delete) = next_prev() | 32 | let (merged, to_delete) = next_prev() |
33 | .filter_map(|dir| neighbor(&use_item, dir)) | 33 | .filter_map(|dir| neighbor(&use_item, dir)) |
34 | .filter_map(|it| Some((it.clone(), it.use_tree()?))) | 34 | .filter_map(|it| Some((it.clone(), it.use_tree()?))) |