We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 275c5c4 commit ebcee96Copy full SHA for ebcee96
1 file changed
crates/syntax/src/syntax_editor/edit_algo.rs
@@ -111,11 +111,8 @@ pub(super) fn apply_edits(editor: SyntaxEditor) -> SyntaxEdit {
111
// Check if this change is dependent on another change (i.e. it's contained within another range)
112
if let Some(index) = changed_ancestors
113
.iter()
114
- .rev()
115
- .position(|ancestor| ancestor.affected_range().contains_range(change.target_range()))
+ .rposition(|ancestor| ancestor.affected_range().contains_range(change.target_range()))
116
{
117
- let index = changed_ancestors.len() - 1 - index;
118
-
119
// Pop off any ancestors that aren't applicable
120
changed_ancestors.drain((index + 1)..);
121
0 commit comments