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

implement storage decode length for BTreeSet #12503

Merged

Conversation

dharjeezy
Copy link
Contributor

This PR implemnts StorageDecodeLength for unbounded BTreeSet

closes #12443

Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

Small nitpicks, otherwise looks good.

@@ -1335,6 +1337,10 @@ mod private {
impl<T: Encode> StorageAppend<T> for Vec<T> {}
impl<T: Encode> StorageDecodeLength for Vec<T> {}

impl<T: Encode> Sealed for BTreeSet<T> {}
Copy link
Member

Choose a reason for hiding this comment

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

Can you please move this to the other implementations?

pub use sp_runtime::TransactionOutcome;
use sp_std::collections::btree_set::BTreeSet;
Copy link
Member

Choose a reason for hiding this comment

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

Above we already include sp_std. Please move it there.

@dharjeezy dharjeezy requested review from ggwpez and removed request for bkchr October 17, 2022 12:53
@ggwpez ggwpez added 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. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Oct 17, 2022
@ggwpez
Copy link
Member

ggwpez commented Oct 17, 2022

Just need to make the CI happy now. You can click on the failing jobs, eg Clippy: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1958117

@bkchr bkchr merged commit b9a555d into paritytech:master Oct 18, 2022
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* implement storage decode length for BTreeSet

* Orderly moving of things around

* include test for append and decode_len

* fix cargo clippy issue
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. 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.

impl StorageDecodeLength for BTreeSet
3 participants