From d115dadeb14fb07ce6239e449c561fc805d6b007 Mon Sep 17 00:00:00 2001 From: Vinzent Steinberg Date: Wed, 7 Feb 2018 12:39:29 +0100 Subject: [PATCH] Don't re-export FloatCore This avoids breaking `use num_traits::*`. --- src/float.rs | 2 +- src/lib.rs | 4 ++-- src/sign.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/float.rs b/src/float.rs index f188e8a..5ca80d2 100644 --- a/src/float.rs +++ b/src/float.rs @@ -1565,7 +1565,7 @@ mod tests { #[test] fn convert_deg_rad() { - use FloatCore; + use float::FloatCore; for &(deg, rad) in &DEG_RAD_PAIRS { assert!((FloatCore::to_degrees(rad) - deg).abs() < 1e-6); diff --git a/src/lib.rs b/src/lib.rs index a48bc6a..ec7dbe9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,8 +26,8 @@ use core::fmt; pub use bounds::Bounded; #[cfg(feature = "std")] pub use float::Float; -pub use float::{FloatCore, FloatConst}; -// pub use real::Real; // NOTE: Don't do this, it breaks `use num_traits::*;`. +pub use float::FloatConst; +// pub use real::{FloatCore, Real}; // NOTE: Don't do this, it breaks `use num_traits::*;`. pub use identities::{Zero, One, zero, one}; pub use ops::checked::{CheckedAdd, CheckedSub, CheckedMul, CheckedDiv, CheckedShl, CheckedShr}; pub use ops::wrapping::{WrappingAdd, WrappingMul, WrappingSub}; diff --git a/src/sign.rs b/src/sign.rs index 345dcba..437c8bf 100644 --- a/src/sign.rs +++ b/src/sign.rs @@ -124,7 +124,7 @@ macro_rules! signed_float_impl { /// - `NAN` if the number is NaN #[inline] fn signum(&self) -> $t { - use FloatCore; + use float::FloatCore; FloatCore::signum(*self) }