fix warning

This commit is contained in:
microproofs 2024-02-03 17:50:39 -05:00 committed by Kasey
parent 806a74c192
commit 8702c736d0
1 changed files with 13 additions and 12 deletions

View File

@ -1520,20 +1520,19 @@ impl AirTree {
let mut index_count = IndexCounter::new();
tree_path.push(current_depth, depth_index);
// Assignments get traversed here
match self {
AirTree::UnhoistedSequence(..) => unreachable!("No unhoisted sequence at this point"),
AirTree::Expression(expr) => match expr {
AirExpression::Let { value, .. } => {
value.do_traverse_tree_with(
tree_path,
current_depth + 1,
index_count.next_number(),
with,
apply_with_func_last,
);
}
_ => (),
},
AirTree::Expression(AirExpression::Let { value, .. }) => {
value.do_traverse_tree_with(
tree_path,
current_depth + 1,
index_count.next_number(),
with,
apply_with_func_last,
);
}
AirTree::Statement { statement, .. } => match statement {
AirStatement::DefineFunc { func_body, .. } => {
func_body.do_traverse_tree_with(
@ -1636,12 +1635,14 @@ impl AirTree {
);
}
},
_ => {}
}
if !apply_with_func_last {
with(self, tree_path);
}
// Expressions or an assignment that hoist over a expression are traversed here
match self {
AirTree::Statement {
hoisted_over: Some(hoisted_over),