mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-04 00:54:52 +00:00
Simplify
This commit is contained in:
parent
b02027d4fe
commit
3987bf5d6f
6 changed files with 26 additions and 30 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ pub fn param(pat: ast::Pat, ty: ast::Type) -> ast::Param {
|
|||
}
|
||||
|
||||
pub fn self_param() -> ast::SelfParam {
|
||||
ast_from_text(&format!("fn f(&self) {{ }}"))
|
||||
ast_from_text("fn f(&self) { }")
|
||||
}
|
||||
|
||||
pub fn ret_type(ty: ast::Type) -> ast::RetType {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue