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