From f320a21f04bcffc0faf6adffe90c7cbd92531654 Mon Sep 17 00:00:00 2001 From: Samuel Thomas Date: Thu, 18 Jul 2024 16:46:19 -0500 Subject: [PATCH] [fud2] Fix planner so that it doesn't rely on the order operations are defined (#2211) There was a small bug with the planner where it would stop searching when a through op appeared anywhere in the `ops` map. It really should only stop if an op is one edge away from the current state. This worked before because I guess the `ops` map happened to be ordered in such a way where things worked. Fixes #2209. --- fud2/fud-core/src/exec/planner.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fud2/fud-core/src/exec/planner.rs b/fud2/fud-core/src/exec/planner.rs index 49adc1dada..b475d9a9f8 100644 --- a/fud2/fud-core/src/exec/planner.rs +++ b/fud2/fud-core/src/exec/planner.rs @@ -92,11 +92,11 @@ impl SingleOpOutputPlanner { state_queue.push(op.output[0]); visited[op.output[0]] = true; breadcrumbs[op.output[0]] = Some(op_ref); - } - // Finish when we reach the goal edge. - if end == Destination::Op(op_ref) { - break; + // Finish when we reach the goal edge. + if end == Destination::Op(op_ref) { + break; + } } } }