Bump insert_entry stabilization to Rust 1.59

This commit is contained in:
David Tolnay 2021-12-20 13:14:06 -08:00
parent 09b0780719
commit a2fd84a125
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -2458,7 +2458,7 @@ impl<'a, K, V> Entry<'a, K, V> {
/// assert_eq!(entry.key(), &"poneyland"); /// assert_eq!(entry.key(), &"poneyland");
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "entry_insert", since = "1.58.0")] #[stable(feature = "entry_insert", since = "1.59.0")]
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> { pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> {
match self { match self {
Occupied(mut entry) => { Occupied(mut entry) => {
@ -2803,7 +2803,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
/// assert_eq!(map["poneyland"], 37); /// assert_eq!(map["poneyland"], 37);
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "entry_insert", since = "1.58.0")] #[stable(feature = "entry_insert", since = "1.59.0")]
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> { pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> {
let base = self.base.insert_entry(value); let base = self.base.insert_entry(value);
OccupiedEntry { base } OccupiedEntry { base }