Update doctests for renames

This commit is contained in:
Félix Saparelli 2021-10-28 02:38:10 +13:00
parent a314678639
commit 9c8e88b973

View file

@ -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);
/// ```