Fix clippy::while_let_loop
This commit is contained in:
parent
b28ca32db2
commit
964edd9943
1 changed files with 11 additions and 15 deletions
|
@ -212,8 +212,7 @@ impl AstEditor<ast::FnDef> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn strip_attrs_and_docs(&mut self) {
|
pub fn strip_attrs_and_docs(&mut self) {
|
||||||
loop {
|
while let Some(start) = self
|
||||||
if let Some(start) = self
|
|
||||||
.ast()
|
.ast()
|
||||||
.syntax()
|
.syntax()
|
||||||
.children_with_tokens()
|
.children_with_tokens()
|
||||||
|
@ -224,9 +223,6 @@ impl AstEditor<ast::FnDef> {
|
||||||
Some(_) | None => start,
|
Some(_) | None => start,
|
||||||
};
|
};
|
||||||
self.ast = self.replace_children(RangeInclusive::new(start, end), iter::empty());
|
self.ast = self.replace_children(RangeInclusive::new(start, end), iter::empty());
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue