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
I have an enum with many variants with variable sizes. If there is 72 variants and fewer and I pass invalid bytes to the deserializer, it correctly reports the data cannot be deserialized. However, if there are more than 72 variants and I pass invalid bytes, the deserializer returns the 73rd enum variant regardless of how many variants there are or what the variant contains.
I cannot say whether the mistake is in serde or postcard because I cannot get to the derived implementation of Deserialize for my enum.
Is there anything I can do? Maybe use flavors?
I know 70+ variants is a lot, those are commands my application can receive and react to. I do not think I can realistically reduce the number. I am not sure that any of my code can help here.
Thank you.
The text was updated successfully, but these errors were encountered:
I have an enum with many variants with variable sizes. If there is 72 variants and fewer and I pass invalid bytes to the deserializer, it correctly reports the data cannot be deserialized. However, if there are more than 72 variants and I pass invalid bytes, the deserializer returns the 73rd enum variant regardless of how many variants there are or what the variant contains.
I cannot say whether the mistake is in serde or postcard because I cannot get to the derived implementation of
Deserialize
for my enum.Is there anything I can do? Maybe use flavors?
I know 70+ variants is a lot, those are commands my application can receive and react to. I do not think I can realistically reduce the number. I am not sure that any of my code can help here.
Thank you.
The text was updated successfully, but these errors were encountered: