aboutsummaryrefslogtreecommitdiff
path: root/crates/assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists')
-rw-r--r--crates/assists/src/assist_config.rs6
-rw-r--r--crates/assists/src/handlers/merge_imports.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/assists/src/assist_config.rs b/crates/assists/src/assist_config.rs
index 786224cfa..c458d9054 100644
--- a/crates/assists/src/assist_config.rs
+++ b/crates/assists/src/assist_config.rs
@@ -5,7 +5,7 @@
5//! assists if we are allowed to. 5//! assists if we are allowed to.
6 6
7use hir::PrefixKind; 7use hir::PrefixKind;
8use ide_db::helpers::insert_use::MergeBehaviour; 8use ide_db::helpers::insert_use::MergeBehavior;
9 9
10use crate::AssistKind; 10use crate::AssistKind;
11 11
@@ -39,12 +39,12 @@ impl Default for AssistConfig {
39 39
40#[derive(Clone, Copy, Debug, PartialEq, Eq)] 40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub struct InsertUseConfig { 41pub struct InsertUseConfig {
42 pub merge: Option<MergeBehaviour>, 42 pub merge: Option<MergeBehavior>,
43 pub prefix_kind: PrefixKind, 43 pub prefix_kind: PrefixKind,
44} 44}
45 45
46impl Default for InsertUseConfig { 46impl Default for InsertUseConfig {
47 fn default() -> Self { 47 fn default() -> Self {
48 InsertUseConfig { merge: Some(MergeBehaviour::Full), prefix_kind: PrefixKind::Plain } 48 InsertUseConfig { merge: Some(MergeBehavior::Full), prefix_kind: PrefixKind::Plain }
49 } 49 }
50} 50}
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 @@
1use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour}; 1use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehavior};
2use syntax::{ 2use 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);