diff options
| author | Félix Saparelli <felix@passcod.name> | 2021-10-28 02:38:10 +1300 |
|---|---|---|
| committer | Félix Saparelli <felix@passcod.name> | 2021-10-28 02:38:56 +1300 |
| commit | 9c8e88b97353d18a422ec9b67ac06da47bdc632e (patch) | |
| tree | b952b4b98987e696bd2041a26a57044fa2ad4c02 | |
| parent | a314678639089dcc703e9ad4cb705f79abba0a39 (diff) | |
| download | rust-9c8e88b97353d18a422ec9b67ac06da47bdc632e.tar.gz rust-9c8e88b97353d18a422ec9b67ac06da47bdc632e.zip | |
Update doctests for renames
| -rw-r--r-- | library/std/src/collections/hash/map.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index fd56a311e50..7851c5bf5fb 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -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); /// ``` |
