mirror of https://codeberg.org/topola/topola.git
chore(autorouter): remove unnecessary mutability
This commit is contained in:
parent
f4f8971662
commit
92e8600452
|
|
@ -176,16 +176,13 @@ impl<M: AccessMesadata> Autorouter<M> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn measure_length(
|
pub fn measure_length(
|
||||||
&mut self,
|
&self,
|
||||||
selection: &BandSelection,
|
selection: &BandSelection,
|
||||||
) -> Result<MeasureLengthExecutionStepper, AutorouterError> {
|
) -> Result<MeasureLengthExecutionStepper, AutorouterError> {
|
||||||
MeasureLengthExecutionStepper::new(selection)
|
MeasureLengthExecutionStepper::new(selection)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn ratline_endpoints(
|
pub fn ratline_endpoints(&self, ratline: EdgeIndex<usize>) -> (FixedDotIndex, FixedDotIndex) {
|
||||||
&mut self,
|
|
||||||
ratline: EdgeIndex<usize>,
|
|
||||||
) -> (FixedDotIndex, FixedDotIndex) {
|
|
||||||
let (source, target) = self.ratsnest.graph().edge_endpoints(ratline).unwrap();
|
let (source, target) = self.ratsnest.graph().edge_endpoints(ratline).unwrap();
|
||||||
|
|
||||||
let source_dot = match self
|
let source_dot = match self
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ impl MeasureLengthExecutionStepper {
|
||||||
|
|
||||||
pub fn doit(
|
pub fn doit(
|
||||||
&mut self,
|
&mut self,
|
||||||
autorouter: &mut Autorouter<impl AccessMesadata>,
|
autorouter: &Autorouter<impl AccessMesadata>,
|
||||||
) -> Result<f64, AutorouterError> {
|
) -> Result<f64, AutorouterError> {
|
||||||
let length = if let Some(length) = self.maybe_length {
|
let length = if let Some(length) = self.maybe_length {
|
||||||
length
|
length
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue