pub fn or_insert(self, default: V) -> &'a mut V {
        match self {
            Occupied(entry) => entry.into_mut(),
            Vacant(entry) => entry.insert(default),
        }
    }
/// Ensures a value is in the entry by inserting the default if empty, and returns
/// a mutable reference to the value in the entry.
///
/// # Examples
///
/// ```
/// use std::collections::HashMap;
///
/// let mut map: HashMap<&str, u32> = HashMap::new();
/// map.entry("poneyland").or_insert(12);
///
/// assert_eq!(map["poneyland"], 12);
///
/// *map.entry("poneyland").or_insert(12) += 10;
/// assert_eq!(map["poneyland"], 22);
/// ```
Ensures a value is in the entry by inserting the default if empty, and returns
a mutable reference to the value in the entry.
Ensures a value is in the entry by inserting the default if empty and returns a mutable reference to the value in the entry .
pub fn or_insert(self, default: V) -> &'a mut V {
        match self {
            Occupied(entry) => entry.into_mut(),
            Vacant(entry) => entry.insert(default),
        }
    }
pub fn or_insert ( self , default : V ) -> & ' a mut V { match self { Occupied ( entry ) => entry . into_mut ( ) , Vacant ( entry ) => entry . insert ( default ) , } }
Ensures a value is in the entry by inserting the default if empty, and returns
a mutable reference to the value in the entry.
Ensures a value is in the entry by inserting the default if empty and returns a mutable reference to the value in the entry .
self
default
V
examples
```
use std::collections::HashMap.

let mut map: HashMap<&str, u32> = HashMap::new();
map.entry("poneyland").or_insert(12).




` ` ` use std :: collections :: HashMap . let mut map : HashMap<&str u32 > = HashMap :: new () ; map . entry ( " poneyland " ) . or_insert ( 12 ) .