Implement into_keys and into_values for associative maps#75163
Implement into_keys and into_values for associative maps#75163bors merged 8 commits intorust-lang:masterfrom
into_keys and into_values for associative maps#75163Conversation
4a7a49d to
c2c7b37
Compare
…oKeys and IntoValues
c2c7b37 to
16a5217
Compare
dtolnay
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me once the IntoValues min and max are fixed. Please also file a tracking issue (separate from the original "feature request" issue) and update the unstable attribute issue numbers in the PR.
|
Thanks for the review! Filed #75294 as the tracking issue and and change the old number to the new in the patch (added two more commits to address them). |
| /// use std::collections::HashMap; | ||
| /// | ||
| /// let mut map = HashMap::new(); | ||
| /// map.insert("a", 1); |
There was a problem hiding this comment.
Perhaps it's better an example with HashMap<String> instead of HashMap<&str> ?
|
@bors r+ |
|
📌 Commit 4cd2637 has been approved by |
|
☀️ Test successful - checks-actions, checks-azure |
| @@ -1,3 +1,5 @@ | |||
| // ignore-tidy-filelength | |||
There was a problem hiding this comment.
I think IntoKeys and impls should be moved to a module file to remove this tidy ignore.
This is pretty much a direct copy of rust-lang/rust#75163, aligning the hashbrown API with current std API.
This is pretty much a direct copy of rust-lang/rust#75163, aligning the hashbrown API with current std API.
Add into_keys and into_values to HashMap. This is pretty much a direct copy of rust-lang/rust#75163, aligning the hashbrown API with current std API.
This PR implements
into_keysandinto_valuesfor HashMap and BTreeMap types. They are implemented as unstable, undermap_into_keys_valuesfeature.Fixes #55214.
r? @dtolnay