Open LDeakin opened 5 months ago
Without arbitrary_precision the following runs without error:
arbitrary_precision
#[derive(Debug, PartialEq, serde::Deserialize)] #[serde(untagged)] pub enum Num { Float(f64), } fn main() { assert_eq!(serde_json::from_str::<Num>(r#"1.0"#).unwrap(), Num::Float(1f64)); }
With arbitrary_precision, serde_json::from_str::<Num>(r#"1.0"#) fails with Error("data did not match any variant of untagged enum Num", line: 0, column: 0).
serde_json::from_str::<Num>(r#"1.0"#)
Error("data did not match any variant of untagged enum Num", line: 0, column: 0)
This issue is similar.
Without
arbitrary_precision
the following runs without error:With
arbitrary_precision
,serde_json::from_str::<Num>(r#"1.0"#)
fails withError("data did not match any variant of untagged enum Num", line: 0, column: 0)
.This issue is similar.