Skip to content

Commit 67b9ecc

Browse files
committed
Import std::num::Float explicitly.
It was removed from the prelude as part of <rust-lang/rust#18827>.
1 parent c3338cb commit 67b9ecc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/approxeq.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10+
use std::num::Float;
1011

1112
/// Trait for testing approximate equality
1213
pub trait ApproxEq<Eps> {
@@ -44,4 +45,4 @@ impl ApproxEq<f64> for f64 {
4445
fn approx_eq_eps(&self, other: &f64, approx_epsilon: &f64) -> bool {
4546
(*self - *other).abs() < *approx_epsilon
4647
}
47-
}
48+
}

0 commit comments

Comments
 (0)