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
This generally wouldn't be a problem because you can omit the #[serde(deserialize_with = "my_deserializer")] on any unit variants, but I was trying to get this to work with a field_attribute in prost-build, so it was automatically being applied to every field in the enum.
The text was updated successfully, but these errors were encountered:
Jonathan-Landeed
changed the title
deserialize_with converts unit enum variants to newtype enum variantsdeserialize_with expects newtype enum variants, even for unit enum variants
Feb 21, 2024
when expanded has the visitor:
No matter what my_deserializer is, this results in "invalid type: unit variant, expected newtype variant".
I tried
and
This generally wouldn't be a problem because you can omit the
#[serde(deserialize_with = "my_deserializer")]
on any unit variants, but I was trying to get this to work with a field_attribute in prost-build, so it was automatically being applied to every field in the enum.The text was updated successfully, but these errors were encountered: