Stop visiting once it's found Let

This commit is contained in:
Centri3 2023-06-11 09:43:26 -05:00
parent d989f432a4
commit 108c04acf0

View file

@ -96,8 +96,8 @@ impl Visitor<'_> for IsAnyLetVisitor {
fn visit_expr(&mut self, expr: &Expr<'_>) {
if matches!(expr.kind, ExprKind::Let(..)) {
self.0 = true;
} else {
walk_expr(self, expr);
}
walk_expr(self, expr);
}
}