mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-16 09:15:02 +01:00
item deleter pass
This commit is contained in:
parent
22804c3065
commit
fdfde615f6
8 changed files with 162 additions and 5 deletions
|
|
@ -28,6 +28,8 @@ impl VisitMut for Visitor<'_> {
|
|||
[syn::Stmt::Expr(syn::Expr::Loop(syn::ExprLoop {
|
||||
body: loop_body, ..
|
||||
}))] if loop_body.stmts.is_empty() => {}
|
||||
// Empty bodies are empty already, no need to loopify them.
|
||||
[] => {}
|
||||
_ 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