diff --git a/src/float.rs b/src/float.rs index c2e28d4..7952357 100644 --- a/src/float.rs +++ b/src/float.rs @@ -6,14 +6,12 @@ use core::num::FpCategory; #[cfg(feature = "std")] use std::f32; -use {Num, ToPrimitive}; -#[cfg(feature = "std")] -use NumCast; +use {Num, NumCast, ToPrimitive}; /// Generic trait for floating point numbers that works with `no_std`. /// /// This trait implements a subset of the `Float` trait. -pub trait FloatCore: Num + Neg + PartialOrd + Copy { +pub trait FloatCore: Num + NumCast + Neg + PartialOrd + Copy { /// Returns positive infinity. fn infinity() -> Self;