fix(autorouter/planar_reconfigurer): Differentiate search nodes also by length

This fixes 4x4_1206_led_matrix_breakout test.
This commit is contained in:
Mikolaj Wielgus 2025-11-18 19:05:22 +01:00
parent 88f8b3610d
commit f2c67ed81d
1 changed files with 4 additions and 2 deletions

View File

@ -69,7 +69,9 @@ struct SccSearchNode {
impl Ord for SccSearchNode { impl Ord for SccSearchNode {
fn cmp(&self, other: &Self) -> Ordering { 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 { impl PartialEq for SccSearchNode {
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
self.curr_permutation == other.curr_permutation self.curr_permutation == other.curr_permutation && self.length == other.length
} }
} }