-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not derive encode/decode when discriminant doesn't fit u8. #283
Comments
I tried to compile:
I didn't get any compile error, how did you get it ? |
I was thinking maybe we should reserve the index: |
I added a variant to Maybe you only get that for binary literals. |
It's a good idea, though would break any existing 256 variant enums 😁 |
yes it is breaking enums which uses the index 255, even if it contained less variants. |
Do we see |
whe the discriminant doesn't fit u8 the derivation is wrong (more precisely: unexpected)
I think we can use
From::from
instead ofas
maybe but it is probably a breaking change.The text was updated successfully, but these errors were encountered: