just works

This commit is contained in:
nora 2022-12-17 22:55:59 +01:00
parent dcd163aeda
commit 436546eaf5
7 changed files with 23 additions and 14 deletions

View file

@ -27,7 +27,7 @@ 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() => {}
}))] if loop_body.stmts.is_empty() && self.checker.can_process(&self.current_path) => {}
_ => {
*block = self.loop_expr.clone();
self.process_state = ProcessState::Changed;