diff --git a/src/adaptors/rotmat.rs b/src/adaptors/rotmat.rs index 5d218ef8..61442d35 100644 --- a/src/adaptors/rotmat.rs +++ b/src/adaptors/rotmat.rs @@ -209,8 +209,7 @@ Rand for Rotmat> { impl Dim for Rotmat { #[inline] fn dim(_: Option>) -> uint { - let _dim: Option = None; - Dim::dim(_dim) + Dim::dim(None::) } } diff --git a/src/adaptors/transform.rs b/src/adaptors/transform.rs index af78d433..46cc19d5 100644 --- a/src/adaptors/transform.rs +++ b/src/adaptors/transform.rs @@ -86,8 +86,7 @@ impl Transform>, Vec3> { impl Dim for Transform { #[inline] fn dim(_: Option>) -> uint { - let _dim: Option = None; - Dim::dim(_dim) + Dim::dim(None::) } } @@ -285,8 +284,7 @@ ToHomogeneous for Transform { let mut res = self.submat.to_homogeneous(); // copy the translation - let _dim: Option = None; - let dim = Dim::dim(_dim); + let dim = Dim::dim(None::); res.set_column(dim - 1, self.subtrans.to_homogeneous()); @@ -297,8 +295,7 @@ ToHomogeneous for Transform { impl + Dim, M2: FromHomogeneous, V> FromHomogeneous for Transform { fn from(m: &M) -> Transform { - let _dim: Option = None; - Transform::new(FromHomogeneous::from(m), m.column(Dim::dim(_dim) - 1)) + Transform::new(FromHomogeneous::from(m), m.column(Dim::dim(None::) - 1)) } } diff --git a/src/mat_macros.rs b/src/mat_macros.rs index a4c7c2f2..65ba04f4 100644 --- a/src/mat_macros.rs +++ b/src/mat_macros.rs @@ -502,10 +502,8 @@ macro_rules! outer_impl( fn outer(&self, other: &$t) -> $m { let mut res: $m = Zero::zero(); - let _dim: Option<$t> = None; - for i in range(0u, Dim::dim(_dim)) { - let _dim: Option<$t> = None; - for j in range(0u, Dim::dim(_dim)) { + for i in range(0u, Dim::dim(None::<$t>)) { + for j in range(0u, Dim::dim(None::<$t>)) { res.set((i, j), self.at(i) * other.at(j)) } }