mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
cargo clippy --fix
This commit is contained in:
parent
1ab8c7fd27
commit
fad4fa163c
178 changed files with 595 additions and 738 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