Update doctests for renames
This commit is contained in:
parent
a314678639
commit
9c8e88b973
1 changed files with 2 additions and 2 deletions
|
@ -2454,7 +2454,7 @@ impl<'a, K, V> Entry<'a, K, V> {
|
|||
/// use std::collections::HashMap;
|
||||
///
|
||||
/// let mut map: HashMap<&str, String> = HashMap::new();
|
||||
/// let entry = map.entry("poneyland").insert("hoho".to_string());
|
||||
/// let entry = map.entry("poneyland").insert_entry("hoho".to_string());
|
||||
///
|
||||
/// assert_eq!(entry.key(), &"poneyland");
|
||||
/// ```
|
||||
|
@ -2800,7 +2800,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
|
|||
/// let mut map: HashMap<&str, u32> = HashMap::new();
|
||||
///
|
||||
/// if let Entry::Vacant(o) = map.entry("poneyland") {
|
||||
/// o.insert(37);
|
||||
/// o.insert_entry(37);
|
||||
/// }
|
||||
/// assert_eq!(map["poneyland"], 37);
|
||||
/// ```
|
||||
|
|
Loading…
Add table
Reference in a new issue