diff options
| author | pravic <[email protected]> | 2016-04-29 21:25:33 +0300 |
|---|---|---|
| committer | pravic <[email protected]> | 2016-04-29 21:25:33 +0300 |
| commit | 8c8ef9d5b88377f345220e577ca78e1713b87539 (patch) | |
| tree | 9bf7ae22e9e635b67734aeb14226d4ed9e0b58c0 /libcore/num/flt2dec | |
| parent | add libcore from 2016-04-11 nightly (diff) | |
| download | kmd-env-rs-8c8ef9d5b88377f345220e577ca78e1713b87539.tar.xz kmd-env-rs-8c8ef9d5b88377f345220e577ca78e1713b87539.zip | |
apply libcore_nofp patch
Diffstat (limited to 'libcore/num/flt2dec')
| -rw-r--r-- | libcore/num/flt2dec/decoder.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcore/num/flt2dec/decoder.rs b/libcore/num/flt2dec/decoder.rs index 6265691..0a28a14 100644 --- a/libcore/num/flt2dec/decoder.rs +++ b/libcore/num/flt2dec/decoder.rs @@ -12,6 +12,7 @@ use prelude::v1::*; +#[cfg(not(disable_float))] use {f32, f64}; use num::{Float, FpCategory}; @@ -57,10 +58,12 @@ pub trait DecodableFloat: Float + Copy { fn min_pos_norm_value() -> Self; } +#[cfg(not(disable_float))] impl DecodableFloat for f32 { fn min_pos_norm_value() -> Self { f32::MIN_POSITIVE } } +#[cfg(not(disable_float))] impl DecodableFloat for f64 { fn min_pos_norm_value() -> Self { f64::MIN_POSITIVE } } |