From 0e292f05f72a8b48a8621f8f97801d6ae0e2d1b7 Mon Sep 17 00:00:00 2001 From: Kirill Dubovikov Date: Sat, 21 Mar 2020 21:52:00 +0300 Subject: [PATCH] fixed formatting errors --- src/numeric/impl_numeric.rs | 5 ++--- src/private.rs | 2 +- tests/numeric.rs | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/numeric/impl_numeric.rs b/src/numeric/impl_numeric.rs index f6af73e51..a3858f829 100644 --- a/src/numeric/impl_numeric.rs +++ b/src/numeric/impl_numeric.rs @@ -154,7 +154,7 @@ where /// ``` pub fn var(&self, ddof: A) -> A where - A: Float + FromPrimitive + A: Float + FromPrimitive, { let zero = A::from_usize(0).expect("Converting 0 to `A` must not fail."); let n = A::from_usize(self.len()).expect("Converting length to `A` must not fail."); @@ -216,12 +216,11 @@ where /// ``` pub fn std(&self, ddof: A) -> A where - A: Float + FromPrimitive + A: Float + FromPrimitive, { self.var(ddof).sqrt() } - /// Return sum along `axis`. /// /// ``` diff --git a/src/private.rs b/src/private.rs index ea13164e4..552b31497 100644 --- a/src/private.rs +++ b/src/private.rs @@ -21,5 +21,5 @@ macro_rules! private_impl { fn __private__(&self) -> crate::private::PrivateMarker { crate::private::PrivateMarker } - } + }; } diff --git a/tests/numeric.rs b/tests/numeric.rs index cfb9e51d7..13f8433c5 100644 --- a/tests/numeric.rs +++ b/tests/numeric.rs @@ -68,7 +68,6 @@ fn sum_mean_empty() { fn var() { let a = array![1., -4.32, 1.14, 0.32]; assert_abs_diff_eq!(a.var(0.), 5.049875, epsilon = 1e-8); - } #[test] @@ -102,7 +101,6 @@ fn var_empty_arr() { fn std() { let a = array![1., -4.32, 1.14, 0.32]; assert_abs_diff_eq!(a.std(0.), 2.24719, epsilon = 1e-5); - } #[test]