Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vks committed Apr 30, 2021
1 parent 4321a5f commit 204cf1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/integration/mean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

use core::iter::Iterator;

use average::{MeanWithError, Estimate, Merge, assert_almost_eq};
use average::{MeanWithError, Estimate, Merge};
#[cfg(any(feature = "std", feature = "libm"))]
use average::assert_almost_eq;

#[test]
fn trivial() {
Expand Down
8 changes: 6 additions & 2 deletions tests/integration/moments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ fn simple() {
assert_eq!(a.standardized_moment(2), 1.0);
assert_almost_eq!(a.sample_skewness(), 0.0, 1e-15);
assert_almost_eq!(a.standardized_moment(3), 0.0, 1e-15);
a.add(1.0);
}
a.add(1.0);
#[cfg(any(feature = "std", feature = "libm"))] {
// skewness
assert_almost_eq!(a.standardized_moment(3), 0.2795084971874741, 1e-15);
// kurtosis
Expand All @@ -69,7 +71,9 @@ fn simple_serde() {
assert_eq!(c.standardized_moment(2), 1.0);
assert_almost_eq!(c.sample_skewness(), 0.0, 1e-15);
assert_almost_eq!(c.standardized_moment(3), 0.0, 1e-15);
c.add(1.0);
}
c.add(1.0);
#[cfg(any(feature = "std", feature = "libm"))] {
// skewness
assert_almost_eq!(c.standardized_moment(3), 0.2795084971874741, 1e-15);
// kurtosis
Expand Down

0 comments on commit 204cf1f

Please sign in to comment.