- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
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 RFCT-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(binary_heap_contains_remove)]
This is a tracking issue for BinaryHeap::contains and BinaryHeap::remove.  These methods are missing from the BinaryHeap API and both are common operations that one would expect to have for any general-purpose container.
Previous discussion: #66724.
Public API
impl<T: Ord> BinaryHeap<T> {
    pub fn contains<Q: ?Sized>(&self, item: &Q) -> bool
    where
        T: Borrow<Q>,
        Q: PartialEq;
    pub fn remove<Q: ?Sized>(&self, item: &Q) -> Option<T>
    where
        T: Borrow<Q>,
        Q: PartialEq;
}Steps / History
-  Implementation: Add BinaryHeap::containsandBinaryHeap::remove#82002
- Final commenting period (FCP)
- Stabilization PR
Unresolved Questions
- What is the best way to check if an item exists in a BinaryHeap?
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 RFCT-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.