From 2ee38b9d57b750793e04b979f67dce7f4dc2a873 Mon Sep 17 00:00:00 2001 From: Vinzent Steinberg Date: Wed, 10 Jan 2018 16:02:55 +0100 Subject: [PATCH] Fix clippy warnings --- tests/macros.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/macros.rs b/tests/macros.rs index 777198e..a3a09ba 100644 --- a/tests/macros.rs +++ b/tests/macros.rs @@ -1,3 +1,5 @@ +#![cfg_attr(feature = "cargo-clippy", allow(float_cmp))] + #[macro_use] extern crate average; extern crate core; @@ -13,7 +15,7 @@ fn concatenate_simple() { { let mut s = MinMax::new(); for i in 1..6 { - s.add(i as f64); + s.add(f64::from(i)); } assert_eq!(s.min(), 1.0); @@ -23,7 +25,7 @@ fn concatenate_simple() { { let mut s = MinMax::default(); for i in 1..6 { - s.add(i as f64); + s.add(f64::from(i)); } assert_eq!(s.min(), 1.0);