-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-collectionsArea: `std::collections`Area: `std::collections`B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(map_into_keys_values)]
This is a tracking issue for {HashMap,BTreeMap}::into_{keys,values}
.
Public API
// alloc::collections::btree_map
impl<K, V> BTreeMap<K, V> {
pub fn into_keys(self) -> IntoKeys<K, V>;
pub fn into_values(self) -> IntoValues<K, V>;
}
pub struct IntoKeys<K, V>;
pub struct IntoValues<K, V>;
impl<K, V> Iterator for IntoKeys<K, V> { type Item = K; }
impl<K, V> DoubleEndedIterator for IntoKeys<K, V> {}
impl<K, V> ExactSizeIterator for IntoKeys<K, V> {}
impl<K, V> FusedIterator for IntoKeys<K, V> {}
impl<K: Debug, V> Debug for IntoKeys<K, V> {}
impl<K, V> Iterator for IntoValues<K, V> { type Item = V; }
impl<K, V> DoubleEndedIterator for IntoValues<K, V> {}
impl<K, V> ExactSizeIterator for IntoValues<K, V> {}
impl<K, V> FusedIterator for IntoValues<K, V> {}
impl<K, V: Debug> Debug for IntoValues<K, V> {}
// alloc::collections::hash_map
impl<K: Eq + Hash, V, S: BuildHasher> HashMap<K, V, S> {
pub fn into_keys(self) -> IntoKeys<K, V>;
pub fn into_values(self) -> IntoValues<K, V>;
}
pub struct IntoKeys<K, V>;
pub struct IntoValues<K, V>;
impl<K, V> Iterator for IntoKeys<K, V> { type Item = K; }
impl<K, V> ExactSizeIterator for IntoKeys<K, V> {}
impl<K, V> FusedIterator for IntoKeys<K, V> {}
impl<K: Debug, V> Debug for IntoKeys<K, V> {}
impl<K, V> Iterator for IntoValues<K, V> { type Item = V; }
impl<K, V> ExactSizeIterator for IntoValues<K, V> {}
impl<K, V> FusedIterator for IntoValues<K, V> {}
impl<K, V: Debug> Debug for IntoValues<K, V> {}
Steps / History
- Requested in Add
into_keys
andinto_values
to associative maps #55214. - Implementation: Implement
into_keys
andinto_values
for associative maps #75163 - Final commenting period (FCP)
- Stabilization PR: Stablize {HashMap,BTreeMap}::into_{keys,values} #84328
Unresolved Questions
- None yet.
Urhengulas, connorskees, bronvic, agersant, Voronar and 10 more
Metadata
Metadata
Assignees
Labels
A-collectionsArea: `std::collections`Area: `std::collections`B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.