From 2d5952ae7c7f2400711ac5a269dec896eaa2cafc Mon Sep 17 00:00:00 2001 From: Kai Schmidt Date: Fri, 14 Jun 2024 13:24:22 -0700 Subject: [PATCH] make astar respect execution limit --- src/algorithm/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/algorithm/mod.rs b/src/algorithm/mod.rs index f2220a272..a501d2b1d 100644 --- a/src/algorithm/mod.rs +++ b/src/algorithm/mod.rs @@ -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()); } @@ -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()); } @@ -980,6 +982,7 @@ fn astar_impl( |n| { let res = (|| -> UiuaResult { 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()); }