In a debug build, evaluating
Decimal::from_str_radix(
"zzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzz",
36,
)
panics with an unsigned subtraction underflow. It should instead return
Err(Error::ExceedsMaximumPossibleValue).
The input has 19 radix-36 digits before and after the decimal point.
The panic occurs after a rounding carry after an underflow here:
|
(coeff.len() as u32) - (digits_before_dot as u32) |
#807 did not fix this.
In a debug build, evaluating
panics with an unsigned subtraction underflow. It should instead return
Err(Error::ExceedsMaximumPossibleValue).The input has 19 radix-36 digits before and after the decimal point.
The panic occurs after a rounding carry after an underflow here:
rust-decimal/src/str.rs
Line 713 in 6683079
#807 did not fix this.