chore(autorouter): remove unnecessary mutability

This commit is contained in:
Ellen Emilia Anna Zscheile 2025-04-25 21:37:37 +02:00
parent f4f8971662
commit 92e8600452
2 changed files with 3 additions and 6 deletions

View File

@ -176,16 +176,13 @@ impl<M: AccessMesadata> Autorouter<M> {
}
pub fn measure_length(
&mut self,
&self,
selection: &BandSelection,
) -> Result<MeasureLengthExecutionStepper, AutorouterError> {
MeasureLengthExecutionStepper::new(selection)
}
pub fn ratline_endpoints(
&mut self,
ratline: EdgeIndex<usize>,
) -> (FixedDotIndex, FixedDotIndex) {
pub fn ratline_endpoints(&self, ratline: EdgeIndex<usize>) -> (FixedDotIndex, FixedDotIndex) {
let (source, target) = self.ratsnest.graph().edge_endpoints(ratline).unwrap();
let source_dot = match self

View File

@ -35,7 +35,7 @@ impl MeasureLengthExecutionStepper {
pub fn doit(
&mut self,
autorouter: &mut Autorouter<impl AccessMesadata>,
autorouter: &Autorouter<impl AccessMesadata>,
) -> Result<f64, AutorouterError> {
let length = if let Some(length) = self.maybe_length {
length