Stabilize BTree{Map,Set}::retain

This commit is contained in:
Jubilee Young 2021-04-12 00:01:31 -07:00
parent e41f378f82
commit 7baeaa95e2
2 changed files with 2 additions and 4 deletions

View File

@ -940,7 +940,6 @@ impl<K, V> BTreeMap<K, V> {
/// # Examples
///
/// ```
/// #![feature(btree_retain)]
/// use std::collections::BTreeMap;
///
/// let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
@ -949,7 +948,7 @@ impl<K, V> BTreeMap<K, V> {
/// assert!(map.into_iter().eq(vec![(0, 0), (2, 20), (4, 40), (6, 60)]));
/// ```
#[inline]
#[unstable(feature = "btree_retain", issue = "79025")]
#[stable(feature = "btree_retain", since = "1.53.0")]
pub fn retain<F>(&mut self, mut f: F)
where
K: Ord,

View File

@ -851,7 +851,6 @@ impl<T> BTreeSet<T> {
/// # Examples
///
/// ```
/// #![feature(btree_retain)]
/// use std::collections::BTreeSet;
///
/// let xs = [1, 2, 3, 4, 5, 6];
@ -860,7 +859,7 @@ impl<T> BTreeSet<T> {
/// set.retain(|&k| k % 2 == 0);
/// assert!(set.iter().eq([2, 4, 6].iter()));
/// ```
#[unstable(feature = "btree_retain", issue = "79025")]
#[stable(feature = "btree_retain", since = "1.53.0")]
pub fn retain<F>(&mut self, mut f: F)
where
T: Ord,