Skip to content

Commit

Permalink
make astar respect execution limit
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Jun 14, 2024
1 parent c9eb7c0 commit 2d5952a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/algorithm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ fn astar_impl(
|n| {
let res = (|| {
let mut env = env.borrow_mut();
env.respect_execution_limit()?;
for arg in args.iter().take(nei_sig.args.saturating_sub(1)).rev() {
env.push(arg.clone());
}
Expand Down Expand Up @@ -951,6 +952,7 @@ fn astar_impl(
|n| {
let res = (|| {
let mut env = env.borrow_mut();
env.respect_execution_limit()?;
for arg in args.iter().take(heu_sig.args.saturating_sub(1)).rev() {
env.push(arg.clone());
}
Expand Down Expand Up @@ -980,6 +982,7 @@ fn astar_impl(
|n| {
let res = (|| -> UiuaResult<bool> {
let mut env = env.borrow_mut();
env.respect_execution_limit()?;
for arg in args.iter().take(isg_sig.args.saturating_sub(1)).rev() {
env.push(arg.clone());
}
Expand Down

0 comments on commit 2d5952a

Please sign in to comment.