diff --git a/src/length.rs b/src/length.rs index d92997d..1c9add0 100644 --- a/src/length.rs +++ b/src/length.rs @@ -282,26 +282,6 @@ mod tests { assert_eq!(length.get(), vec![1, 2, 3, 4]); } - #[test] - fn test_fmt_debug() { - // Debug and display format the value only. - let one_cm: Length = Length::new(10.0); - - let result = format!("{:?}", one_cm); - - assert_eq!(result, "10"); - } - - #[test] - fn test_fmt_display() { - // Debug and display format the value only. - let one_cm: Length = Length::new(10.0); - - let result = format!("{}", one_cm); - - assert_eq!(result, "10"); - } - #[test] fn test_add() { let length1: Length = Length::new(250); diff --git a/src/transform2d.rs b/src/transform2d.rs index 7ba417c..d782a2f 100644 --- a/src/transform2d.rs +++ b/src/transform2d.rs @@ -357,7 +357,6 @@ where T: Copy + Clone + Mul + Div + Neg + - ApproxEq + PartialOrd + Trig + One + Zero { diff --git a/src/transform3d.rs b/src/transform3d.rs index c979164..7993ae7 100644 --- a/src/transform3d.rs +++ b/src/transform3d.rs @@ -117,7 +117,6 @@ where T: Copy + Clone + Mul + Div + Neg + - ApproxEq + PartialOrd + Trig + One + Zero { @@ -190,7 +189,8 @@ where T: Copy + Clone + (m33 * det) < _0 } - pub fn approx_eq(&self, other: &Self) -> bool { + pub fn approx_eq(&self, other: &Self) -> bool + where T : ApproxEq { self.m11.approx_eq(&other.m11) && self.m12.approx_eq(&other.m12) && self.m13.approx_eq(&other.m13) && self.m14.approx_eq(&other.m14) && self.m21.approx_eq(&other.m21) && self.m22.approx_eq(&other.m22) && diff --git a/src/vector.rs b/src/vector.rs index 456e1a6..6bdef1a 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -166,7 +166,7 @@ where T: Copy + Mul + Add + Sub { } #[inline] - pub fn length(&self) -> T where T: Float + ApproxEq { + pub fn length(&self) -> T where T: Float { self.square_length().sqrt() } }