From 92e8600452136729c24bfc7e54135c13954a122c Mon Sep 17 00:00:00 2001 From: Ellen Emilia Anna Zscheile Date: Fri, 25 Apr 2025 21:37:37 +0200 Subject: [PATCH] chore(autorouter): remove unnecessary mutability --- src/autorouter/autorouter.rs | 7 ++----- src/autorouter/measure_length.rs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/autorouter/autorouter.rs b/src/autorouter/autorouter.rs index a62dc1e..d94b750 100644 --- a/src/autorouter/autorouter.rs +++ b/src/autorouter/autorouter.rs @@ -176,16 +176,13 @@ impl Autorouter { } pub fn measure_length( - &mut self, + &self, selection: &BandSelection, ) -> Result { MeasureLengthExecutionStepper::new(selection) } - pub fn ratline_endpoints( - &mut self, - ratline: EdgeIndex, - ) -> (FixedDotIndex, FixedDotIndex) { + pub fn ratline_endpoints(&self, ratline: EdgeIndex) -> (FixedDotIndex, FixedDotIndex) { let (source, target) = self.ratsnest.graph().edge_endpoints(ratline).unwrap(); let source_dot = match self diff --git a/src/autorouter/measure_length.rs b/src/autorouter/measure_length.rs index 5e60fa9..07425eb 100644 --- a/src/autorouter/measure_length.rs +++ b/src/autorouter/measure_length.rs @@ -35,7 +35,7 @@ impl MeasureLengthExecutionStepper { pub fn doit( &mut self, - autorouter: &mut Autorouter, + autorouter: &Autorouter, ) -> Result { let length = if let Some(length) = self.maybe_length { length