Fix clippy::while_let_loop

This commit is contained in:
Alan Du 2019-06-04 02:58:22 -04:00
parent b28ca32db2
commit 964edd9943

View file

@ -212,8 +212,7 @@ impl AstEditor<ast::FnDef> {
}
pub fn strip_attrs_and_docs(&mut self) {
loop {
if let Some(start) = self
while let Some(start) = self
.ast()
.syntax()
.children_with_tokens()
@ -224,9 +223,6 @@ impl AstEditor<ast::FnDef> {
Some(_) | None => start,
};
self.ast = self.replace_children(RangeInclusive::new(start, end), iter::empty());
} else {
break;
}
}
}
}