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

codegen: fix compact unnamed fields #327

Merged
merged 10 commits into from
Nov 25, 2021
Merged

Conversation

ascjones
Copy link
Contributor

Generated types for unnamed fields were not preserving the #[code(compact)] attribute e.g.

struct TupleStruct(#[codec(compact)] u32);

There is still a bit of code duplication here which was a cause of this bug (it works for named fields), it needs consolidating. Will do a follow up with refactoring.

@ascjones ascjones marked this pull request as ready for review November 24, 2021 17:54
@dvdplm dvdplm requested review from insipx and jsdw November 24, 2021 18:23
@ascjones ascjones merged commit e2ab01d into master Nov 25, 2021
@ascjones ascjones deleted the aj-fix-compact-variant-field branch November 25, 2021 13:34
0623forbidden pushed a commit to DEIPworld/substrate-subxt that referenced this pull request Feb 15, 2022
* codegen: fix compact unnamed fields

* Fmt

* Regenerate polkadot codegen example.

* Ignore clippy for generated code

* Limit the number of test threads

* Revert "Limit the number of test threads"

This reverts commit f1947dc.

* Delete duplicate node_runtime metadata

* Update node_runtime metadata

* Update balances events
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