refactor(stepper): Have reconfigure configuration take any type, not only `Vec<_>`

This commit is contained in:
Mikolaj Wielgus 2025-10-18 16:25:20 +02:00
parent f96728fbe0
commit 4306aa33c4
2 changed files with 7 additions and 3 deletions

View File

@ -236,7 +236,7 @@ impl<M: AccessMesadata> Abort<Autorouter<M>> for PlanarAutorouteExecutionStepper
}
impl<M: AccessMesadata> Reconfigure<Autorouter<M>> for PlanarAutorouteExecutionStepper {
type Index = RatlineUid;
type Configuration = Vec<RatlineUid>;
type Output = Result<(), AutorouterError>;
fn reconfigure(

View File

@ -55,10 +55,14 @@ pub trait Abort<Ctx> {
/// Some steppers may be permuted from their initial order.
pub trait Reconfigure<Ctx> {
type Index;
type Configuration;
type Output;
fn reconfigure(&mut self, context: &mut Ctx, ordering: Vec<Self::Index>) -> 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