-
Notifications
You must be signed in to change notification settings - Fork 184
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
Correct the get_mut
and get_mut_or_default
for ByteMapView
#2238
Correct the get_mut
and get_mut_or_default
for ByteMapView
#2238
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.
Thanks for the fix. I'm assuming that only get_mut
and get_mut_or_default
are changed meaningfully
a68f448
to
9030d5d
Compare
linera-views/src/map_view.rs
Outdated
}; | ||
Ok(match update { | ||
None => None, | ||
Some(update) => match update { |
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.
nit: Some(Update::Removed) => None
etc to avoid nested match
es (the compiler will re-optimize)
using Result systematically.
f25ee92
to
6da1d10
Compare
Motivation
For those two functions, the
deleted_prefixes
were not handled which is a mistake.Proposal
While being at that some other things were done:
.unwrap()
were replaced by?
and the use ofResult<()>
or similar.get_mut
and similar functions inCollectionView
/ReentrantCollectionView
was changed so that it now takes a&[u8]
instead ofVec<u8>
for simplicity.load_value
was eliminated.Test Plan
A specific test that repro
Release Plan
The internal documentation of the functions was changed to reflect the new API.
Links