aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/handlers/reorder_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_assists/src/handlers/reorder_impl.rs')
-rw-r--r--crates/ide_assists/src/handlers/reorder_impl.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ide_assists/src/handlers/reorder_impl.rs b/crates/ide_assists/src/handlers/reorder_impl.rs
index fd2897c4c..72d889248 100644
--- a/crates/ide_assists/src/handlers/reorder_impl.rs
+++ b/crates/ide_assists/src/handlers/reorder_impl.rs
@@ -79,11 +79,9 @@ pub(crate) fn reorder_impl(acc: &mut Assists, ctx: &AssistContext) -> Option<()>
79 "Sort methods", 79 "Sort methods",
80 target, 80 target,
81 |builder| { 81 |builder| {
82 for (old, new) in 82 methods.into_iter().zip(sorted).for_each(|(old, new)| {
83 methods.into_iter().zip(sorted).filter(|(field, sorted)| field != sorted) 83 ted::replace(builder.make_ast_mut(old).syntax(), new.clone_for_update().syntax())
84 { 84 });
85 ted::replace(builder.make_ast_mut(old).syntax(), new.clone_for_update().syntax());
86 }
87 }, 85 },
88 ) 86 )
89} 87}