Tracking Issue for Vec::pop_if
#122741
Labels
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Feature gate:
#![feature(vec_pop_if)]
This feature adds the
Vec::pop_if
method, which takes a predicate, evaluates it with the last element in theVec
if present, and returns the item if the predicate returnstrue
. This makes it possible to conditionally remove the last element without the use ofunwrap
.Public API
Steps / History
pop_if
orEntry
/Peek
-like API forVec
andVecDeque
libs-team#208Vec::pop_if
#123107Unresolved Questions
VecDeque::pop_front_if
andVecDeque::pop_back_if
API under this as well?Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: