Skip to content

Commit

Permalink
Rollup merge of #95491 - faern:stabilize-vec_retain_mut, r=yaahc
Browse files Browse the repository at this point in the history
Stabilize feature vec_retain_mut on Vec and VecDeque

Closes #90829
  • Loading branch information
Dylan-DPC committed Mar 31, 2022
2 parents 64a3767 + 796f385 commit c90a947
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions library/alloc/src/collections/vec_deque/mod.rs
Expand Up @@ -2185,8 +2185,6 @@ impl<T, A: Allocator> VecDeque<T, A> {
/// # Examples
///
/// ```
/// #![feature(vec_retain_mut)]
///
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand All @@ -2199,7 +2197,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
/// });
/// assert_eq!(buf, [3, 5]);
/// ```
#[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,
Expand Down
4 changes: 1 addition & 3 deletions library/alloc/src/vec/mod.rs
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit c90a947

Please sign in to comment.