Skip to content

Commit

Permalink
Rollup merge of rust-lang#70712 - :stabilize-remove-entry, r=Amanieu
Browse files Browse the repository at this point in the history
stabilize BTreeMap::remove_entry

This PR stabilizes `BTreeMap::remove_entry` as implemented in rust-lang#68378.

Closes rust-lang#66714
  • Loading branch information
Dylan-DPC committed Apr 25, 2020
2 parents b6e03c4 + 3f1a588 commit 29fd528
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/liballoc/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,15 +923,14 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// Basic usage:
///
/// ```
/// #![feature(btreemap_remove_entry)]
/// use std::collections::BTreeMap;
///
/// let mut map = BTreeMap::new();
/// map.insert(1, "a");
/// 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>,
Expand Down

0 comments on commit 29fd528

Please sign in to comment.