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
Is there any way to tell serde to treat the above as a newtype struct? The above code is currently failing as serde expects a tuple where there's actually a string.
I hit this today trying to make a serializable enum with tuple struct variants containing unserializable fields. I can't do it because #[skip] is ignored.
Fixed in b4e51fc. It will continue to serialize as a tuple even if there is only one field. #1054 is tracking an attribute that would make types with a single serialized field serialize just like the underlying field.
Open question: whether a tuple struct with all but one skipped field should be serialized as a tuple struct of length 1 or a newtype struct.
The text was updated successfully, but these errors were encountered: