-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add Entry
API
#5
Comments
CC @gankro I'm trying to determine the behavior of There are two options, then:
I prefer the second option, as it makes the behavior consistent with |
Sounds good. However why can't the behaviour be maintained? The entry has unique access to the map. |
It's possible to get an *e.get_mut() = value; // or *e.into_mut() = value; In that case, the node's position in the list isn't updated, even though calling |
I'm saying |
It could, but then it always would. In other words, would you expect this to change the node's position, even though neither the key nor the value is changed? if let Entry::Occupied(mut e) = map.entry(key) {
e.get_mut();
} |
Seems isomorphic to |
Oh wait, maybe I'm thinking too much about LRU cache. |
Yeah, that only applies to |
Entry::get_mut/into_mut should have isomorphic behaviour to |
Agreed. That's what I was suggesting with option 2 above. |
I will point out that while |
Hey guys, what's the status of this issue? When would this |
We would be interested in using this for serde_json: serde-rs/json#236. |
No description provided.
The text was updated successfully, but these errors were encountered: