Skip to content
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

Fix MaxEncodedLen derive macro for enum with skipped variant #622

Merged

Conversation

gui1117
Copy link
Contributor

@gui1117 gui1117 commented Aug 16, 2024

right now MaxEncodedLen do not differentiate betwen skipped variants and normal variants on enum.

Now skipped variant are correctly skipped.

(also thinking again, it is not so much consistent to have skipped variant being not decodable and skipped fields being decoded to default value. Maybe it should be 2 different names)

This reverts commit 40f632b90663e49ef79b1d19d054c672d46b22d5.
@gui1117
Copy link
Contributor Author

gui1117 commented Aug 22, 2024

CI fails because I am external maybe? or CI is down?

@ggwpez
Copy link
Member

ggwpez commented Aug 22, 2024

@gui1117 i started the CI now. Looks like the format is not happy and the clippy because of unconstructed variants 🙃

@gui1117
Copy link
Contributor Author

gui1117 commented Aug 22, 2024

@gui1117 i started the CI now. Looks like the format is not happy and the clippy because of unconstructed variants 🙃

Thanks, it should be fixed hopefully

@ggwpez ggwpez merged commit 1dba1fa into paritytech:master Aug 23, 2024
17 checks passed
@gui1117 gui1117 deleted the gui-enum-skip-variant-max-encoded-len branch August 23, 2024 09:51
@niklasad1 niklasad1 mentioned this pull request Oct 24, 2024
@jsdw jsdw mentioned this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants