-
Notifications
You must be signed in to change notification settings - Fork 355
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
Range with no prefix support #433
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see three useful no_prefix functions.
But since no prefix is always ()
/ vec![]
, let's remove the argument, the extra trait type and just hard code it those 3 places.
6d54b2c
to
3dd1f8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite nice. Except for removing all the #[cfg(feature = "iterator")]
everywhere.
Not sure how we can disable iterator (default) in cosmwasm-storage unless it is explicitly set. We should try to at least build the code without iterator enabled and ensure this works.
Please rebase on #438 (maybe after merge?) and fix any CI failures (due to iterator) before merge. |
13eedee
to
5468556
Compare
Remove NoPrefix trait
5468556
to
5010b07
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Adds aJust force the empty prefix inNoPrefix
associated type, to use forrange()
short-cuts inMap
along with theEmptyPrefix
marker.Map::range
.This type was missing from the impl. Adding it basically allows the added test case, where we iterate over a triple key without a prefix.Removed it altogether for simplicity.Can be reviewed / merged independently of #432. Already integrated in #432 branch.