mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Merge commit 'a911652360
' into sync-from-ra
This commit is contained in:
parent
0661390ad4
commit
e4866b6ddb
315 changed files with 7088 additions and 4415 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue