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
S
Description
My contributions to magiclen/byte-unit: 3 commits
36 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 100%