mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-16 01:05:02 +01:00
more
This commit is contained in:
parent
a36bf95c3e
commit
1cb5114557
7 changed files with 226 additions and 69 deletions
|
|
@ -27,11 +27,12 @@ impl VisitMut for Visitor<'_> {
|
|||
match block.stmts.as_slice() {
|
||||
[syn::Stmt::Expr(syn::Expr::Loop(syn::ExprLoop {
|
||||
body: loop_body, ..
|
||||
}))] if loop_body.stmts.is_empty() && self.checker.can_process(&self.current_path) => {}
|
||||
_ => {
|
||||
}))] if loop_body.stmts.is_empty() => {}
|
||||
_ if self.checker.can_process(&self.current_path) => {
|
||||
*block = self.loop_expr.clone();
|
||||
self.process_state = ProcessState::Changed;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue