-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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.
Description
Feature gate: #![feature(btree_merge)]
This is a tracking issue for rust-lang/libs-team#739
It adds a method similar to BTreeMap::append with merging two BTreeMaps in O(n + m) complexity, but allows the user to specify a callback function to handle what the resulting value should be for conflicting keys.
Public API
// use std::collections::BTreeMap; or use alloc::collections::btree_map;
impl <K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
pub fn merge(&mut self, other: BTreeMap<K, V, A>, conflict: impl FnMut(&K, V, V) -> V) { ... }
}Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
- ACP: ACP: Add
BTreeMap::append_withlibs-team#739 - Implementation: implement BTreeMap::merge #151981
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Footnotes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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.