Skip to content

Commit ba61809

Browse files
committed
adapt raw strings to new SyntaxEditor semantics
1 parent 526d4c9 commit ba61809

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

crates/ide-assists/src/handlers/raw_string.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use ide_db::source_change::SourceChangeBuilder;
22
use syntax::{
33
AstNode, AstToken,
4-
ast::{self, IsString, syntax_factory::SyntaxFactory},
4+
ast::{self, IsString},
55
};
66

77
use crate::{
@@ -164,16 +164,15 @@ fn replace_literal(
164164
) {
165165
let old_token = token.syntax();
166166
let parent = old_token.parent().expect("no parent token");
167-
let make = SyntaxFactory::with_mappings();
168167
let editor = builder.make_editor(&parent);
168+
let make = editor.make();
169169
let new_literal = make.expr_literal(new);
170170
let new_token = new_literal
171171
.syntax()
172172
.first_child_or_token()
173173
.and_then(|it| it.into_token())
174174
.expect("literal has no token child");
175175
editor.replace(old_token, new_token);
176-
editor.add_mappings(make.finish_with_mappings());
177176
builder.add_file_edits(ctx.vfs_file_id(), editor);
178177
}
179178

0 commit comments

Comments
 (0)