-
Notifications
You must be signed in to change notification settings - Fork 14k
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.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(vec_deque_pop_if)]
Similar to #122741, but this time with VecDeque instead of Vec.
Public API
impl<T> VecDeque<T> {
pub fn pop_front_if(&mut self, predicate: impl FnOnce(&mut T) -> bool) -> Option<T>;
pub fn pop_back_if(&mut self, predicate: impl FnOnce(&mut T) -> bool) -> Option<T>;
}Steps / History
- ACP:
pop_iforEntry/Peek-like API forVecandVecDequelibs-team#208 - Implementation: Implement
VecDeque::pop_front_if&VecDeque::pop_back_if#135890 - Final comment period (FCP)1
- Stabilization PR: Stabilize
vec_deque_pop_if#145992
Unresolved Questions
Vec::pop_ifuses an explicit generic parameter for the predicate. But that might change (Tracking Issue forVec::pop_if#122741 (comment)). If it does not, probably change these methods instead to be consistent.
Footnotes
avandesa, scottlamb, acshi, ewancg, joseluis and 2 more
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.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.