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
Number(Float(Float(1.0)))
"1"
Number(Integer(1))
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `Number(Float(Float(1.0)))`,
right: `Number(Integer(1))`', src/main.rs:9:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This seems plausible as a ser/de behavior if RON only has a number type, but if that's the case ron::Value::Number should depend only on the numeric value not the discriminant.
The text was updated successfully, but these errors were encountered:
Even though the deserialized Value is an Integer in this case, it still deserializes perfectly into an f64 (handled internally by serde's Deserialize impl for f64).
The only thing that is really missing is describe how two structurally different Numbers can deserialize into the same value. This could be done, e.g. like so:
This example program probably ought to exit successfully
But it doesn't:
This seems plausible as a ser/de behavior if RON only has a number type, but if that's the case
ron::Value::Number
should depend only on the numeric value not the discriminant.The text was updated successfully, but these errors were encountered: