Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/algo.rs')
| -rw-r--r-- | crates/syntax/src/algo.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/algo.rs b/crates/syntax/src/algo.rs index 88d24df8b8..9c7f93e130 100644 --- a/crates/syntax/src/algo.rs +++ b/crates/syntax/src/algo.rs @@ -212,7 +212,7 @@ pub fn diff(from: &SyntaxNode, to: &SyntaxNode) -> TreeDiff { look_ahead_scratch.push(rhs_ele.clone()); let mut rhs_children_clone = rhs_children.clone(); let mut insert = false; - while let Some(rhs_child) = rhs_children_clone.next() { + for rhs_child in &mut rhs_children_clone { if syntax_element_eq(&lhs_ele, &rhs_child) { cov_mark::hit!(diff_insertions); insert = true; |