Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Fix generate_storage_alias! #11102

Merged
merged 3 commits into from
Mar 23, 2022

Conversation

shawntabrizi
Copy link
Member

@shawntabrizi shawntabrizi commented Mar 23, 2022

This PR does 2 things:

  1. Fixes a bug with the generate_storage_alias! macro, where some of the syntaxes had the key and hasher in the wrong order in the underlying storage definition.
  2. Chooses the more intuitive order of (hasher, key) for the macro definition, which lines up with the order of these same types in the underlying storage type definition.

Fortunately, the Rust type system prevents anyone from really messing up here.

@shawntabrizi shawntabrizi changed the title Fix generate_storage_alias docs Fix generate_storage_alias! docs Mar 23, 2022
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Mar 23, 2022
@shawntabrizi shawntabrizi changed the title Fix generate_storage_alias! docs Fix generate_storage_alias! Mar 23, 2022
@shawntabrizi shawntabrizi added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D2-breaksapi D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Mar 23, 2022
@shawntabrizi
Copy link
Member Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 97ee3d1 into master Mar 23, 2022
@paritytech-processbot paritytech-processbot bot deleted the shawntabrizi-fix-generate-storage-alias branch March 23, 2022 22:10
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
* add test

* fix issues

* make order intuitive
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
* add test

* fix issues

* make order intuitive
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
* add test

* fix issues

* make order intuitive
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
* add test

* fix issues

* make order intuitive
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* add test

* fix issues

* make order intuitive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D2-breaksapi D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants