1
Fork 0

Rollup merge of #70712 - :stabilize-remove-entry, r=Amanieu

stabilize BTreeMap::remove_entry

This PR stabilizes `BTreeMap::remove_entry` as implemented in https://github.com/rust-lang/rust/pull/68378.

Closes https://github.com/rust-lang/rust/issues/66714
This commit is contained in:
Dylan DPC 2020-04-25 18:30:27 +02:00 committed by GitHub
commit 29fd528114
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -923,7 +923,6 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// Basic usage:
///
/// ```
/// #![feature(btreemap_remove_entry)]
/// use std::collections::BTreeMap;
///
/// let mut map = BTreeMap::new();
@ -931,7 +930,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// assert_eq!(map.remove_entry(&1), Some((1, "a")));
/// assert_eq!(map.remove_entry(&1), None);
/// ```
#[unstable(feature = "btreemap_remove_entry", issue = "66714")]
#[stable(feature = "btreemap_remove_entry", since = "1.44.0")]
pub fn remove_entry<Q: ?Sized>(&mut self, key: &Q) -> Option<(K, V)>
where
K: Borrow<Q>,