Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/reorder_fields.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/reorder_fields.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ide-assists/src/handlers/reorder_fields.rs b/crates/ide-assists/src/handlers/reorder_fields.rs index 4d3e85ab1b..972303c2a0 100644 --- a/crates/ide-assists/src/handlers/reorder_fields.rs +++ b/crates/ide-assists/src/handlers/reorder_fields.rs @@ -92,10 +92,9 @@ fn replace<T: AstNode + PartialEq>( fields: impl Iterator<Item = T>, sorted_fields: impl IntoIterator<Item = T>, ) { - fields.zip(sorted_fields).for_each(|(field, sorted_field)| { - // FIXME: remove `clone_for_update` when `SyntaxEditor` handles it for us - editor.replace(field.syntax(), sorted_field.syntax().clone_for_update()) - }); + fields + .zip(sorted_fields) + .for_each(|(field, sorted_field)| editor.replace(field.syntax(), sorted_field.syntax())); } fn compute_fields_ranks( |