Skip to content

Commit

Permalink
Slightly better visited definition
Browse files Browse the repository at this point in the history
  • Loading branch information
edusporto committed Jun 10, 2024
1 parent 0f675a8 commit 92773fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ impl Book {
for (name, _) in self.defs.iter() {
let def = &mut compiled_book.defs[lookup[name] as usize];
if !def.safe {
stack.push(&name);
// Temporarily set as safe so we won't need a separate "visited" set
def.safe = true;
for next in rev_dependencies[name.as_str()].iter() {
stack.push(next);
}
}
}

Expand Down

0 comments on commit 92773fb

Please sign in to comment.