-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Map::Entry methods to recover key and value together #33300
Conversation
r? @sfackler |
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
Compilation errors: https://travis-ci.org/rust-lang/rust/builds/126956602 |
695ee05
to
119d0b6
Compare
Fixed |
An alternative that may be nice (and keep the method names consistent) is to |
The libs team discussed this during triage the other day and the conclusion was that this seems like fine functionality to have but we likely want to closely consider the naming. I would personally propose |
cc @rust-lang/libs |
Maybe Python-style |
119d0b6
to
d92ec50
Compare
I've changed the names to |
@@ -1898,6 +1898,12 @@ impl<'a, K: Ord, V> VacantEntry<'a, K, V> { | |||
&self.key | |||
} | |||
|
|||
/// Take ownership of the key. | |||
#[unstable(feature = "map_entry_keys", issue = "32281")] |
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.
Could these point to a new issue? Pointing to a close issue may unfortunately mean that these never come up for stabilization :(
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.
Oh right. Probably need a new feature as well, cause map_entry_keys
is now stable. So just create a new issue "Tracking for map_entry_recover_keys" or some such?
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.
Yeah I can be sure to tag it appropriately and such.
d92ec50
to
217a964
Compare
Added |
Map::Entry methods to recover key and value together See #32281 (comment)
See #32281 (comment)