From f2c67ed81d4241e73ef241c07d925d44409e19f1 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Tue, 18 Nov 2025 19:05:22 +0100 Subject: [PATCH] fix(autorouter/planar_reconfigurer): Differentiate search nodes also by length This fixes 4x4_1206_led_matrix_breakout test. --- src/autorouter/planar_reconfigurer.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/autorouter/planar_reconfigurer.rs b/src/autorouter/planar_reconfigurer.rs index 682fc61..d828e17 100644 --- a/src/autorouter/planar_reconfigurer.rs +++ b/src/autorouter/planar_reconfigurer.rs @@ -69,7 +69,9 @@ struct SccSearchNode { impl Ord for SccSearchNode { fn cmp(&self, other: &Self) -> Ordering { - self.curr_permutation.cmp(&other.curr_permutation) + self.curr_permutation + .cmp(&other.curr_permutation) + .then(self.length.cmp(&other.length)) } } @@ -83,7 +85,7 @@ impl Eq for SccSearchNode {} impl PartialEq for SccSearchNode { fn eq(&self, other: &Self) -> bool { - self.curr_permutation == other.curr_permutation + self.curr_permutation == other.curr_permutation && self.length == other.length } }