6 Commits
Author SHA1 Message Date
dualfroz bf130b54f8 fix: avoid no_std panic in ceil helpers on non-finite input
Byte::from_f64/from_f32 let +inf past the size >= 0.0 guard and then called
the no_std ceil helpers, which used Decimal::from_f64(v).unwrap(). Decimal
conversion returns None for non-finite values, so this panicked in no_std
builds while std returned None. Fall back to the input value for non-finite
input so no_std matches std and the documented None contract is upheld.
2026-09-04 09:45:03 +02:00
upstream 85f79fa753 Upstream magiclen/byte-unit state of the touched files before 4d115cc977 2026-09-04 09:45:03 +02:00
dualfroz 2219c475f1 fix: avoid no_std panic in ceil helpers on non-finite input
Byte::from_f64/from_f32 let +inf past the size >= 0.0 guard and then called
the no_std ceil helpers, which used Decimal::from_f64(v).unwrap(). Decimal
conversion returns None for non-finite values, so this panicked in no_std
builds while std returned None. Fall back to the input value for non-finite
input so no_std matches std and the documented None contract is upheld.
2026-09-04 22:00:21 +02:00
upstream 542a618c5d Upstream magiclen/byte-unit state of the touched files before e84be64ee4 2026-09-04 09:45:03 +02:00
dualfroz ec58c32a8a fix: avoid no_std panic in ceil helpers on non-finite input
Byte::from_f64/from_f32 let +inf past the size >= 0.0 guard and then called
the no_std ceil helpers, which used Decimal::from_f64(v).unwrap(). Decimal
conversion returns None for non-finite values, so this panicked in no_std
builds while std returned None. Fall back to the input value for non-finite
input so no_std matches std and the documented None contract is upheld.
2026-09-06 01:13:22 +02:00
upstream 600cbe8696 Upstream magiclen/byte-unit state of the touched files before 277dd54cc5 2026-09-04 09:45:03 +02:00