Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/toggle_macro_delimiter.rs')
-rw-r--r--crates/ide-assists/src/handlers/toggle_macro_delimiter.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs b/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs
index 15143575e7..4d375080f5 100644
--- a/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs
+++ b/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs
@@ -2,7 +2,7 @@ use ide_db::assists::AssistId;
use syntax::{
AstNode, SyntaxKind, SyntaxToken, T,
algo::{previous_non_trivia_token, skip_trivia_token},
- ast::{self, syntax_factory::SyntaxFactory},
+ ast,
};
use crate::{AssistContext, Assists};
@@ -73,8 +73,8 @@ pub(crate) fn toggle_macro_delimiter(acc: &mut Assists, ctx: &AssistContext<'_>)
},
token_tree.syntax().text_range(),
|builder| {
- let make = SyntaxFactory::with_mappings();
- let mut editor = builder.make_editor(token_tree.syntax());
+ let editor = builder.make_editor(token_tree.syntax());
+ let make = editor.make();
match token {
MacroDelims::LPar | MacroDelims::RPar => {
@@ -100,7 +100,6 @@ pub(crate) fn toggle_macro_delimiter(acc: &mut Assists, ctx: &AssistContext<'_>)
}
}
}
- editor.add_mappings(make.finish_with_mappings());
builder.add_file_edits(ctx.vfs_file_id(), editor);
},
)