From 4306aa33c4eca1ddd49e94599f7a1157c312b669 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Sat, 18 Oct 2025 16:25:20 +0200 Subject: [PATCH] refactor(stepper): Have reconfigure configuration take any type, not only `Vec<_>` --- src/autorouter/planar_autoroute.rs | 2 +- src/stepper.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/autorouter/planar_autoroute.rs b/src/autorouter/planar_autoroute.rs index f8c39a2..2c3d19f 100644 --- a/src/autorouter/planar_autoroute.rs +++ b/src/autorouter/planar_autoroute.rs @@ -236,7 +236,7 @@ impl Abort> for PlanarAutorouteExecutionStepper } impl Reconfigure> for PlanarAutorouteExecutionStepper { - type Index = RatlineUid; + type Configuration = Vec; type Output = Result<(), AutorouterError>; fn reconfigure( diff --git a/src/stepper.rs b/src/stepper.rs index 3f9545f..d7d0f77 100644 --- a/src/stepper.rs +++ b/src/stepper.rs @@ -55,10 +55,14 @@ pub trait Abort { /// Some steppers may be permuted from their initial order. pub trait Reconfigure { - type Index; + type Configuration; type Output; - fn reconfigure(&mut self, context: &mut Ctx, ordering: Vec) -> Self::Output; + fn reconfigure( + &mut self, + context: &mut Ctx, + configuration: Self::Configuration, + ) -> Self::Output; } /// Steppers that can receive discrete events and act on them implement this