fix: move where we call the with in traverse_tree_with

This commit is contained in:
microproofs
2023-08-07 16:25:08 -04:00
committed by Kasey
parent dba0e11ba7
commit 65984ed15b

View File

@@ -1386,12 +1386,8 @@ impl AirTree {
) {
let mut index_count = IndexCounter::new();
tree_path.push(current_depth, depth_index);
with(self, tree_path);
match self {
AirTree::Statement {
statement,
hoisted_over: Some(hoisted_over),
} => {
if let AirTree::Statement { statement, .. } = self {
match statement {
AirStatement::Let { value, .. } => {
value.do_traverse_tree_with(
@@ -1478,7 +1474,15 @@ impl AirTree {
);
}
};
}
with(self, tree_path);
match self {
AirTree::Statement {
hoisted_over: Some(hoisted_over),
..
} => {
hoisted_over.do_traverse_tree_with(
tree_path,
current_depth + 1,