From 532d16136b1a21c08755baabaa8c92b76dbf1d7d Mon Sep 17 00:00:00 2001 From: Jameson Ernst Date: Sat, 28 Feb 2015 16:48:58 -0800 Subject: [PATCH] Fix macros for nightly --- src/structs/dmat.rs | 4 ++-- src/structs/dvec_macros.rs | 4 ++-- src/structs/mat_macros.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index 93a49071..ab3049f0 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -618,13 +618,13 @@ impl> ApproxEq for DMat { #[inline] fn approx_eq_eps(&self, other: &DMat, epsilon: &N) -> bool { - let zip = self.mij.iter().zip(other.mij.iter()); + let mut zip = self.mij.iter().zip(other.mij.iter()); zip.all(|(a, b)| ApproxEq::approx_eq_eps(a, b, epsilon)) } #[inline] fn approx_eq_ulps(&self, other: &DMat, ulps: u32) -> bool { - let zip = self.mij.iter().zip(other.mij.iter()); + let mut zip = self.mij.iter().zip(other.mij.iter()); zip.all(|(a, b)| ApproxEq::approx_eq_ulps(a, b, ulps)) } } diff --git a/src/structs/dvec_macros.rs b/src/structs/dvec_macros.rs index f108f090..2624d7b8 100644 --- a/src/structs/dvec_macros.rs +++ b/src/structs/dvec_macros.rs @@ -319,13 +319,13 @@ macro_rules! dvec_impl( #[inline] fn approx_eq_eps(&self, other: &$dvec, epsilon: &N) -> bool { - let zip = self.as_slice().iter().zip(other.as_slice().iter()); + let mut zip = self.as_slice().iter().zip(other.as_slice().iter()); zip.all(|(a, b)| ApproxEq::approx_eq_eps(a, b, epsilon)) } #[inline] fn approx_eq_ulps(&self, other: &$dvec, ulps: u32) -> bool { - let zip = self.as_slice().iter().zip(other.as_slice().iter()); + let mut zip = self.as_slice().iter().zip(other.as_slice().iter()); zip.all(|(a, b)| ApproxEq::approx_eq_ulps(a, b, ulps)) } } diff --git a/src/structs/mat_macros.rs b/src/structs/mat_macros.rs index 5f5bcac1..064ce573 100644 --- a/src/structs/mat_macros.rs +++ b/src/structs/mat_macros.rs @@ -646,13 +646,13 @@ macro_rules! approx_eq_impl( #[inline] fn approx_eq_eps(&self, other: &$t, epsilon: &N) -> bool { - let zip = self.iter().zip(other.iter()); + let mut zip = self.iter().zip(other.iter()); zip.all(|(a, b)| ApproxEq::approx_eq_eps(a, b, epsilon)) } #[inline] fn approx_eq_ulps(&self, other: &$t, ulps: u32) -> bool { - let zip = self.iter().zip(other.iter()); + let mut zip = self.iter().zip(other.iter()); zip.all(|(a, b)| ApproxEq::approx_eq_ulps(a, b, ulps)) } }