From f524d40403177feb40eaa7850016aaa447320251 Mon Sep 17 00:00:00 2001 From: kennytm Date: Tue, 2 May 2017 01:15:46 +0800 Subject: [PATCH] Workaround rust-lang/rust#41478. Replace all `impl .. for Struct<::Unitless>` by `Struct`. This allows -Zsave-analysis to work on nightly, and I think this is more readable too. --- src/matrix.rs | 4 ++-- src/quaternion.rs | 2 +- src/rotation.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix.rs b/src/matrix.rs index bf58784..55ec5dd 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -1133,7 +1133,7 @@ index_operators!(Matrix4, 4, Vector4, usize); // index_operators!(Matrix3, 3, [Vector3], RangeFull); // index_operators!(Matrix4, 4, [Vector4], RangeFull); -impl From> for Matrix3<::Unitless> where +impl From> for Matrix3 where A: Angle + Into::Unitless>>, { fn from(src: Euler) -> Matrix3 { @@ -1148,7 +1148,7 @@ impl From> for Matrix3<::Unitless> where } } -impl From> for Matrix4<::Unitless> where +impl From> for Matrix4 where A: Angle + Into::Unitless>>, { fn from(src: Euler) -> Matrix4 { diff --git a/src/quaternion.rs b/src/quaternion.rs index 126baa4..af00103 100644 --- a/src/quaternion.rs +++ b/src/quaternion.rs @@ -256,7 +256,7 @@ impl InnerSpace for Quaternion { } } -impl From> for Quaternion<::Unitless> where +impl From> for Quaternion where A: Angle + Into::Unitless>>, { fn from(src: Euler) -> Quaternion { diff --git a/src/rotation.rs b/src/rotation.rs index 65f9a13..e9c50c4 100644 --- a/src/rotation.rs +++ b/src/rotation.rs @@ -370,7 +370,7 @@ impl Rotation3 for Basis3 { } } -impl From> for Basis3<::Unitless> where +impl From> for Basis3 where A: Into::Unitless>>, { /// Create a three-dimensional rotation matrix from a set of euler angles.