Stabilize 'entry_and_modify' feature for HashMap

This commit is contained in:
hedgehog1024 2018-02-12 22:25:03 +03:00 committed by GitHub
parent 770fdeddb4
commit 862132be72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2066,7 +2066,6 @@ impl<'a, K, V> Entry<'a, K, V> {
/// # Examples
///
/// ```
/// #![feature(entry_and_modify)]
/// use std::collections::HashMap;
///
/// let mut map: HashMap<&str, u32> = HashMap::new();
@ -2081,7 +2080,7 @@ impl<'a, K, V> Entry<'a, K, V> {
/// .or_insert(42);
/// assert_eq!(map["poneyland"], 43);
/// ```
#[unstable(feature = "entry_and_modify", issue = "44733")]
#[stable(feature = "entry_and_modify", since = "1.25.0")]
pub fn and_modify<F>(self, mut f: F) -> Self
where F: FnMut(&mut V)
{