diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-10 14:53:59 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-10 14:53:59 +0000 |
commit | 83aa6fbd1ef7fd7faf27d8f7fd8679cb85a8097a (patch) | |
tree | 164ef144e07ed4f24c751355b735169878468789 /crates/assists/src/handlers/merge_imports.rs | |
parent | 1341a98f0551edf3a445c40507ab1abb3d7c71bb (diff) | |
parent | 17f236c2b041de7abd8ec3be208b8eff75fd7ffb (diff) |
Merge #6797
6797: Normalize spelling to American English r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/merge_imports.rs')
-rw-r--r-- | crates/assists/src/handlers/merge_imports.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/assists/src/handlers/merge_imports.rs b/crates/assists/src/handlers/merge_imports.rs index b7e853994..2f0dc7831 100644 --- a/crates/assists/src/handlers/merge_imports.rs +++ b/crates/assists/src/handlers/merge_imports.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour}; | 1 | use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehavior}; |
2 | use syntax::{ | 2 | use syntax::{ |
3 | algo::{neighbor, SyntaxRewriter}, | 3 | algo::{neighbor, SyntaxRewriter}, |
4 | ast, AstNode, | 4 | ast, AstNode, |
@@ -30,7 +30,7 @@ pub(crate) fn merge_imports(acc: &mut Assists, ctx: &AssistContext) -> Option<() | |||
30 | if let Some(use_item) = tree.syntax().parent().and_then(ast::Use::cast) { | 30 | if let Some(use_item) = tree.syntax().parent().and_then(ast::Use::cast) { |
31 | let (merged, to_delete) = | 31 | let (merged, to_delete) = |
32 | next_prev().filter_map(|dir| neighbor(&use_item, dir)).find_map(|use_item2| { | 32 | next_prev().filter_map(|dir| neighbor(&use_item, dir)).find_map(|use_item2| { |
33 | try_merge_imports(&use_item, &use_item2, MergeBehaviour::Full).zip(Some(use_item2)) | 33 | try_merge_imports(&use_item, &use_item2, MergeBehavior::Full).zip(Some(use_item2)) |
34 | })?; | 34 | })?; |
35 | 35 | ||
36 | rewriter.replace_ast(&use_item, &merged); | 36 | rewriter.replace_ast(&use_item, &merged); |
@@ -42,7 +42,7 @@ pub(crate) fn merge_imports(acc: &mut Assists, ctx: &AssistContext) -> Option<() | |||
42 | } else { | 42 | } else { |
43 | let (merged, to_delete) = | 43 | let (merged, to_delete) = |
44 | next_prev().filter_map(|dir| neighbor(&tree, dir)).find_map(|use_tree| { | 44 | next_prev().filter_map(|dir| neighbor(&tree, dir)).find_map(|use_tree| { |
45 | try_merge_trees(&tree, &use_tree, MergeBehaviour::Full).zip(Some(use_tree)) | 45 | try_merge_trees(&tree, &use_tree, MergeBehavior::Full).zip(Some(use_tree)) |
46 | })?; | 46 | })?; |
47 | 47 | ||
48 | rewriter.replace_ast(&tree, &merged); | 48 | rewriter.replace_ast(&tree, &merged); |