1
Fork 0

Rollup merge of #95491 - faern:stabilize-vec_retain_mut, r=yaahc

Stabilize feature vec_retain_mut on Vec and VecDeque

Closes #90829
This commit is contained in:
Dylan DPC 2022-03-31 04:57:27 +02:00 committed by GitHub
commit c90a94707f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View file

@ -1467,8 +1467,6 @@ impl<T, A: Allocator> Vec<T, A> {
/// # Examples
///
/// ```
/// #![feature(vec_retain_mut)]
///
/// let mut vec = vec![1, 2, 3, 4];
/// vec.retain_mut(|x| if *x > 3 {
/// false
@ -1478,7 +1476,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// });
/// assert_eq!(vec, [2, 3, 4]);
/// ```
#[unstable(feature = "vec_retain_mut", issue = "90829")]
#[stable(feature = "vec_retain_mut", since = "1.61.0")]
pub fn retain_mut<F>(&mut self, mut f: F)
where
F: FnMut(&mut T) -> bool,