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

Implement try_append for StorageNMap #5745

Merged
merged 12 commits into from
Sep 23, 2024

Conversation

CJ13th
Copy link
Contributor

@CJ13th CJ13th commented Sep 18, 2024

Description

Closes #5722

Added an implementation of the try_append functionality which is present on the other storage map types but currently missing from StorageNMap.

polkadot address: 12VNFoH4iy4227mpTPvUbUbAnYv7of6LhWcD6EUik3VfFHbD

@CJ13th CJ13th requested a review from a team as a code owner September 18, 2024 01:16
@rainbow-promise
Copy link

LGTM

assert_ok!(FooQuadMap::try_append((2, 1, 1, 1), 5));
assert_eq!(
FooQuadMap::get((2, 1, 1, 1)).unwrap(),
BoundedVec::<u32, ConstU32<7>>::try_from(vec![4, 5]).unwrap(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code above uses the same syntax, so i think this is fine

@shawntabrizi
Copy link
Member

shawntabrizi commented Sep 23, 2024

/tip medium

@CJ13th follow the instructions below to receive a tip

Copy link

@CJ13th Contributor did not properly post their account address.

Make sure the pull request description (or user bio) has: "{network} address: {address}".

@shawntabrizi shawntabrizi added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Sep 23, 2024
@shawntabrizi shawntabrizi added this pull request to the merge queue Sep 23, 2024
Merged via the queue into paritytech:master with commit e0766bb Sep 23, 2024
207 of 209 checks passed
@CJ13th
Copy link
Contributor Author

CJ13th commented Sep 24, 2024

Thanks all for reviewing and merging. @shawntabrizi I have updated the pull request description and my bio to include my DOT address.

@ggwpez
Copy link
Member

ggwpez commented Sep 24, 2024

/tip medium

Copy link

@ggwpez A referendum for a medium (80 DOT) tip was successfully submitted for @CJ13th (12VNFoH4iy4227mpTPvUbUbAnYv7of6LhWcD6EUik3VfFHbD on polkadot).

Referendum number: 1181.
tip

Copy link

The referendum has appeared on Polkassembly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

API fn try_append is missing for StorageNMap
5 participants