Skip fast path for dec2flt when optimize_for_size
This commit is contained in:
parent
336e6ab3b3
commit
c4391b326e
@ -250,8 +250,10 @@ pub fn dec2flt<F: RawFloat>(s: &str) -> Result<F, ParseFloatError> {
|
|||||||
None => return Err(pfe_invalid()),
|
None => return Err(pfe_invalid()),
|
||||||
};
|
};
|
||||||
num.negative = negative;
|
num.negative = negative;
|
||||||
if let Some(value) = num.try_fast_path::<F>() {
|
if cfg!(not(feature = "optimize_for_size")) {
|
||||||
return Ok(value);
|
if let Some(value) = num.try_fast_path::<F>() {
|
||||||
|
return Ok(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If significant digits were truncated, then we can have rounding error
|
// If significant digits were truncated, then we can have rounding error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user