Hi there!
In the Rust compiler and standard library we're planning to limit the width and precision formatting options to a u16. This means that, in a future version of Rust, this line will panic when max_len is larger than u16::MAX:
|
let result = format!("{:.*}", max_len, s); |
This is the only code we found on all of Crates.io and GitHub that triggers the new runtime panic. This is a heads-up to give you the time to adjust your code. Apologies for breaking your code.
See rust-lang/rust#136932 for more information.
If you have any thoughts or concerns about the planned change, feel free to leave a comment on that pull request.
Thanks!