diff -r 221728aeeb7e -r fa8df5a14486 src/loc.rs --- a/src/loc.rs Wed Sep 03 19:55:05 2025 -0500 +++ b/src/loc.rs Wed Sep 03 20:19:41 2025 -0500 @@ -442,7 +442,7 @@ /// Use [`nalgebra`] for larger vectors. #[inline] fn dot>(&self, other: I) -> F { - other.eval_ref_decompose(|r| { + other.eval_ref(|r| { self.0 .iter() .zip(r.0.iter()) @@ -458,7 +458,7 @@ } fn dist2_squared>(&self, other: I) -> F { - other.eval_ref_decompose(|r| { + other.eval_ref(|r| { self.iter().zip(r.iter()).fold(F::ZERO, |m, (&v, &w)| { let d = v - w; m + d * d @@ -480,9 +480,7 @@ fn dist2>(&self, other: I) -> F { // Optimisation for N==1 that avoids squaring and square rooting. if N == 1 { - other.eval_ref_decompose(|r| { - unsafe { *self.0.get_unchecked(0) - *r.0.get_unchecked(0) }.abs() - }) + other.eval_ref(|r| unsafe { *self.0.get_unchecked(0) - *r.0.get_unchecked(0) }.abs()) } else { self.dist2_squared(other).sqrt() } @@ -643,7 +641,7 @@ impl Dist for Loc { #[inline] fn dist>(&self, other: I, _: L1) -> F { - other.eval_ref_decompose(|r| { + other.eval_ref(|r| { self.iter() .zip(r.iter()) .fold(F::ZERO, |m, (&v, &w)| m + (v - w).abs()) @@ -679,7 +677,7 @@ impl Dist for Loc { #[inline] fn dist>(&self, other: I, _: Linfinity) -> F { - other.eval_ref_decompose(|r| { + other.eval_ref(|r| { self.iter() .zip(r.iter()) .fold(F::ZERO, |m, (&v, &w)| m.max((v - w).abs())) @@ -761,7 +759,7 @@ impl AXPY> for Loc { #[inline] fn axpy>>(&mut self, α: F, x: I, β: F) { - x.eval(|x̃| { + x.eval_ref(|x̃| { if β == F::ZERO { map2_mut(self, x̃, |yi, xi| *yi = α * (*xi)) } else { @@ -772,7 +770,7 @@ #[inline] fn copy_from>>(&mut self, x: I) { - x.eval(|x̃| map2_mut(self, x̃, |yi, xi| *yi = *xi)) + x.eval_ref(|x̃| map2_mut(self, x̃, |yi, xi| *yi = *xi)) } #[inline]