Merge commit 'a911652360' into sync-from-ra

This commit is contained in:
Laurențiu Nicola 2024-01-21 16:53:06 +02:00
parent 0661390ad4
commit e4866b6ddb
315 changed files with 7088 additions and 4415 deletions

View file

@ -207,7 +207,7 @@ pub fn diff(from: &SyntaxNode, to: &SyntaxNode) -> TreeDiff {
TreeDiffInsertPos::AsFirstChild(lhs.clone().into())
}
};
diff.insertions.entry(insert_pos).or_insert_with(Vec::new).push(element);
diff.insertions.entry(insert_pos).or_default().push(element);
}
(Some(element), None) => {
cov_mark::hit!(diff_delete);
@ -239,7 +239,7 @@ pub fn diff(from: &SyntaxNode, to: &SyntaxNode) -> TreeDiff {
TreeDiffInsertPos::AsFirstChild(lhs.clone().into())
};
diff.insertions.entry(insert_pos).or_insert_with(Vec::new).extend(drain);
diff.insertions.entry(insert_pos).or_default().extend(drain);
rhs_children = rhs_children_clone;
} else {
go(diff, lhs_ele, rhs_ele);