Skip to content

Commit 9c8e88b

Browse files
committed
Update doctests for renames
1 parent a314678 commit 9c8e88b

File tree

1 file changed

+2
-2
lines changed
  • library/std/src/collections/hash

1 file changed

+2
-2
lines changed

library/std/src/collections/hash/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,7 @@ impl<'a, K, V> Entry<'a, K, V> {
24542454
/// use std::collections::HashMap;
24552455
///
24562456
/// let mut map: HashMap<&str, String> = HashMap::new();
2457-
/// let entry = map.entry("poneyland").insert("hoho".to_string());
2457+
/// let entry = map.entry("poneyland").insert_entry("hoho".to_string());
24582458
///
24592459
/// assert_eq!(entry.key(), &"poneyland");
24602460
/// ```
@@ -2800,7 +2800,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
28002800
/// let mut map: HashMap<&str, u32> = HashMap::new();
28012801
///
28022802
/// if let Entry::Vacant(o) = map.entry("poneyland") {
2803-
/// o.insert(37);
2803+
/// o.insert_entry(37);
28042804
/// }
28052805
/// assert_eq!(map["poneyland"], 37);
28062806
/// ```

0 commit comments

Comments
 (0)