mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
Stabilize feature vec_retain_mut on Vec and VecDeque
This commit is contained in:
parent
3e7514670d
commit
796f385190
@ -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();
|
||||
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user