diff --git a/src/approx.rs b/src/approx.rs index e412d3a..0399dbf 100644 --- a/src/approx.rs +++ b/src/approx.rs @@ -39,10 +39,10 @@ macro_rules! approx_float( } } ) -) +); -approx_float!(f32) -approx_float!(f64) +approx_float!(f32); +approx_float!(f64); #[macro_export] macro_rules! assert_approx_eq_eps( @@ -52,10 +52,10 @@ macro_rules! assert_approx_eq_eps( if !given_val.approx_eq_eps(expected_val, eps) { panic!("assertion failed: `left ≈ right` (left: `{}`, right: `{}`, tolerance: `{}`)", *given_val, *expected_val, *eps - ) + ); } }) -) +); #[macro_export] macro_rules! assert_approx_eq( @@ -65,7 +65,7 @@ macro_rules! assert_approx_eq( panic!("assertion failed: `left ≈ right` (left: `{}`, right: `{}`, tolerance: `{}`)", *given_val, *expected_val, ApproxEq::approx_epsilon(Some(*given_val)) - ) + ); } }) -) +); diff --git a/src/matrix.rs b/src/matrix.rs index 77b5ecc..ad51891 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -422,7 +422,7 @@ impl FixedArray<[[S, ..2], ..2]> for Matrix2 { // y: FixedArray::from_fixed(y), // }, // } - panic!("Unimplemented, pending a fix for rust-lang/rust#16418") + panic!("Unimplemented, pending a fix for rust-lang/rust#16418"); } #[inline] @@ -925,7 +925,7 @@ macro_rules! dot_matrix4( ($A[1][$I]) * ($B[$J][1]) + ($A[2][$I]) * ($B[$J][2]) + ($A[3][$I]) * ($B[$J][3]) -)) +)); impl Matrix> for Matrix4 { #[inline] diff --git a/src/num.rs b/src/num.rs index 19225bd..003b395 100644 --- a/src/num.rs +++ b/src/num.rs @@ -32,18 +32,18 @@ macro_rules! partial_ord_int ( fn partial_max(self, other: $T) -> $T { cmp::max(self, other) } } ) -) +); -partial_ord_int!(int) -partial_ord_int!(i8) -partial_ord_int!(i16) -partial_ord_int!(i32) -partial_ord_int!(i64) -partial_ord_int!(uint) -partial_ord_int!(u8) -partial_ord_int!(u16) -partial_ord_int!(u32) -partial_ord_int!(u64) +partial_ord_int!(int); +partial_ord_int!(i8); +partial_ord_int!(i16); +partial_ord_int!(i32); +partial_ord_int!(i64); +partial_ord_int!(uint); +partial_ord_int!(u8); +partial_ord_int!(u16); +partial_ord_int!(u32); +partial_ord_int!(u64); macro_rules! partial_ord_float ( ($T:ident) => ( @@ -52,10 +52,10 @@ macro_rules! partial_ord_float ( fn partial_max(self, other: $T) -> $T { self.max(other) } } ) -) +); -partial_ord_float!(f32) -partial_ord_float!(f64) +partial_ord_float!(f32); +partial_ord_float!(f64); /// Additive neutral element pub trait Zero { @@ -95,18 +95,18 @@ macro_rules! impl_basenum_int ( } } ) -) +); -impl_basenum_int!(i8) -impl_basenum_int!(i16) -impl_basenum_int!(i32) -impl_basenum_int!(i64) -impl_basenum_int!(u8) -impl_basenum_int!(u16) -impl_basenum_int!(u32) -impl_basenum_int!(u64) -impl_basenum_int!(int) -impl_basenum_int!(uint) +impl_basenum_int!(i8); +impl_basenum_int!(i16); +impl_basenum_int!(i32); +impl_basenum_int!(i64); +impl_basenum_int!(u8); +impl_basenum_int!(u16); +impl_basenum_int!(u32); +impl_basenum_int!(u64); +impl_basenum_int!(int); +impl_basenum_int!(uint); macro_rules! impl_basenum_float ( @@ -128,10 +128,10 @@ macro_rules! impl_basenum_float ( } } ) -) +); -impl_basenum_float!(f32) -impl_basenum_float!(f64) +impl_basenum_float!(f32); +impl_basenum_float!(f64); pub fn zero() -> T { Zero::zero() diff --git a/src/point.rs b/src/point.rs index 1566989..be87393 100644 --- a/src/point.rs +++ b/src/point.rs @@ -120,7 +120,7 @@ impl FixedArray<[S, ..2]> for Point2 { #[inline] fn from_fixed(_v: [S, ..2]) -> Point2 { // match v { [x, y] => Point2 { x: x, y: y } } - panic!("Unimplemented, pending a fix for rust-lang/rust#16418") + panic!("Unimplemented, pending a fix for rust-lang/rust#16418"); } #[inline] diff --git a/src/vector.rs b/src/vector.rs index 3eaa0ff..8a135df 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -236,7 +236,7 @@ macro_rules! vec( #[inline] fn from_fixed(_v: [$S, ..$n]) -> $Self<$S> { // match v { [$($field),+] => $Self { $($field: $field),+ } } - panic!("Unimplemented, pending a fix for rust-lang/rust#16418") + panic!("Unimplemented, pending a fix for rust-lang/rust#16418"); } #[inline] @@ -335,7 +335,7 @@ macro_rules! vec( } } ) -) +); macro_rules! fold { (&$method:ident, { $x:expr, $y:expr }) => { $x.$method(&$y) }; @@ -346,9 +346,9 @@ macro_rules! fold { ($method:ident, { $x:expr, $y:expr, $z:expr, $w:expr }) => { $x.$method($y).$method($z).$method($w) }; } -vec!(Vector2 { x, y }, 2) -vec!(Vector3 { x, y, z }, 3) -vec!(Vector4 { x, y, z, w }, 4) +vec!(Vector2 { x, y }, 2); +vec!(Vector3 { x, y, z }, 3); +vec!(Vector4 { x, y, z, w }, 4); /// Operations specific to numeric two-dimensional vectors. impl Vector2 { diff --git a/tests/angle.rs b/tests/angle.rs index a567081..c0ace6e 100644 --- a/tests/angle.rs +++ b/tests/angle.rs @@ -32,11 +32,11 @@ fn conv() { #[test] fn equiv() { - assert!(Deg::::full_turn().equiv(&-Deg::::full_turn())) - assert!(Deg::::turn_div_2().equiv(&-Deg::::turn_div_2())) - assert!(Deg::::turn_div_3().sub_a(Deg::::full_turn()).equiv(&Deg::::turn_div_3())) + assert!(Deg::::full_turn().equiv(&-Deg::::full_turn())); + assert!(Deg::::turn_div_2().equiv(&-Deg::::turn_div_2())); + assert!(Deg::::turn_div_3().sub_a(Deg::::full_turn()).equiv(&Deg::::turn_div_3())); - assert!(Rad::::full_turn().equiv(&-Rad::::full_turn())) - assert!(Rad::::turn_div_2().equiv(&-Rad::::turn_div_2())) - assert!(Rad::::turn_div_3().sub_a(Rad::::full_turn()).equiv(&Rad::::turn_div_3())) + assert!(Rad::::full_turn().equiv(&-Rad::::full_turn())); + assert!(Rad::::turn_div_2().equiv(&-Rad::::turn_div_2())); + assert!(Rad::::turn_div_3().sub_a(Rad::::full_turn()).equiv(&Rad::::turn_div_3())); }