Upstream magiclen/byte-unit state of the touched files before e84be64ee4
This commit is contained in:
1 parent
ec58c32a8a
commit
542a618c5d
2 files changed
+2
-21
No files matched your search
+2
-12
@@ -36,12 +36,7 @@ pub(crate) fn ceil_f64(v: f64) -> f64 {
|
||||
pub(crate) fn ceil_f64(v: f64) -> f64 {
|
||||
debug_assert!(v >= 0.0);
|
||||
|
||||
// `Decimal::from_f64` returns `None` for non-finite values, so fall back to
|
||||
// the input and mirror `f64::ceil` instead of panicking.
|
||||
match Decimal::from_f64(v) {
|
||||
Some(d) => d.ceil().to_f64().unwrap_or(v),
|
||||
None => v,
|
||||
}
|
||||
Decimal::from_f64(v).unwrap().ceil().to_f64().unwrap()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "byte", feature = "bit"))]
|
||||
@@ -59,12 +54,7 @@ pub(crate) fn ceil_f32(v: f32) -> f32 {
|
||||
pub(crate) fn ceil_f32(v: f32) -> f32 {
|
||||
debug_assert!(v >= 0.0);
|
||||
|
||||
// `Decimal::from_f32` returns `None` for non-finite values, so fall back to
|
||||
// the input and mirror `f32::ceil` instead of panicking.
|
||||
match Decimal::from_f32(v) {
|
||||
Some(d) => d.ceil().to_f32().unwrap_or(v),
|
||||
None => v,
|
||||
}
|
||||
Decimal::from_f32(v).unwrap().ceil().to_f32().unwrap()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "byte", feature = "bit"))]
|
||||
|
||||
Reference in new issue
Block a user