Skip to content

Fix MaxEncodedLen derive macro for enum with skipped variant#622

Merged
ggwpez merged 5 commits intoparitytech:masterfrom
gui1117:gui-enum-skip-variant-max-encoded-len
Aug 23, 2024
Merged

Fix MaxEncodedLen derive macro for enum with skipped variant#622
ggwpez merged 5 commits intoparitytech:masterfrom
gui1117:gui-enum-skip-variant-max-encoded-len

Conversation

@gui1117
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

gui1117 commented Aug 22, 2024

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

@ggwpez
Copy link
Copy Markdown
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
Copy Markdown
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
@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