Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/flip_binexpr.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/flip_binexpr.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ide-assists/src/handlers/flip_binexpr.rs b/crates/ide-assists/src/handlers/flip_binexpr.rs index 601fd29f8e..818a868fe3 100644 --- a/crates/ide-assists/src/handlers/flip_binexpr.rs +++ b/crates/ide-assists/src/handlers/flip_binexpr.rs @@ -52,9 +52,8 @@ pub(crate) fn flip_binexpr(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option if let FlipAction::FlipAndReplaceOp(binary_op) = action { editor.replace(op_token, make.token(binary_op)) }; - // FIXME: remove `clone_for_update` when `SyntaxEditor` handles it for us - editor.replace(lhs.syntax(), rhs.syntax().clone_for_update()); - editor.replace(rhs.syntax(), lhs.syntax().clone_for_update()); + editor.replace(lhs.syntax(), rhs.syntax()); + editor.replace(rhs.syntax(), lhs.syntax()); editor.add_mappings(make.finish_with_mappings()); builder.add_file_edits(ctx.file_id(), editor); }, |