You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and format_args! cannot be be truncated using specified precision.
See the following simplified reproducer, generates the same panic:
let x = serde_json_core::de::Error::custom(format_args!("unknown variant `{}`, expected {}","a","one of bbbbbbbbbbbbbbbbbbbbbbbbb,ccccccccccccccccccc,ddddddddddddddddddddddddd,eeeeeeeeee"));error!("{:?}", x);
The text was updated successfully, but these errors were encountered:
I'm getting a panic in
impl de::Error for Error
when the featurecustom-error-messages
is enabledserde-json-core/src/de/mod.rs
Lines 765 to 784 in ca67457
The panic occurs on the line:
write!(string, "{:.64}", msg).unwrap()
when it tries to format an error message like
The panic occurs because
serde
usesformat_args!
https://github.com/serde-rs/serde/blob/31000e1874ff01362f91e7b53794e402fab4fc78/serde/src/de/mod.rs#L255-L259
and
format_args!
cannot be be truncated using specified precision.See the following simplified reproducer, generates the same panic:
The text was updated successfully, but these errors were encountered: