Closed Skgland closed 5 months ago
ron doesn't support round when a Value
type is involved (e.g., for buffering). https://github.com/ron-rs/ron/issues/397 That is a general issue with serde https://github.com/serde-rs/serde/issues/1183.
Unfortunately, internal buffering is necessary for DefaultOnError
to work. You cannot recover from Deserializer
errors, as the Deserializer
might be in an indeterminate state. The way around that is to deserialize into a type that will not fail, and then attempt to deserialize that into the target type.
Ah, ok, looks like this is a known issue with serde/ron then.
Attempting to roundtrip a value fails for the
Bug
struct in the reduced example below while it works forWorking
, the only difference being theDefaultOnError
on thefield
field inBug
.I would have expected both tests to pass but only
test_working
does.