-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add remove entry from map #49
Conversation
Hi! Adding https://docs.rs/storey/latest/storey/containers/struct.ItemAccess.html
let map = Map::<String, Map<String, Item<u32>>>::new(0);
map.access(&mut storage).entry_mut("foo").entry_mut("bar").set(&42).unwrap();
map.access(&mut storage).entry_remove("foo"); // what are we removing? there's nothing under the "foo" key in the storage backend |
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.
See previous comment
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!
/// | ||
/// let mut storage = TestStorage::new(); | ||
/// let item = Item::<u64, TestEncoding>::new(0); | ||
/// |
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.
/// | |
/// | |
/// item.access(&mut storage).set(&42).unwrap(); |
Not a must, but this probably makes a better doc test here.
No description provided.