Skip to content

Commit

Permalink
Make HashMaps mutable again
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephTLyons committed Dec 3, 2021
1 parent 440cffd commit 72a6974
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/std/src/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ impl<K, V, S> HashMap<K, V, S> {
/// ```
/// use std::collections::HashMap;
///
/// let map = HashMap::from([
/// let mut map = HashMap::from([
/// ("a", 1),
/// ("b", 2),
/// ("c", 3),
Expand Down Expand Up @@ -431,7 +431,7 @@ impl<K, V, S> HashMap<K, V, S> {
/// ```
/// use std::collections::HashMap;
///
/// let map = HashMap::from([
/// let mut map = HashMap::from([
/// ("a", 1),
/// ("b", 2),
/// ("c", 3),
Expand Down Expand Up @@ -1246,7 +1246,7 @@ impl<K: Debug, V: Debug> fmt::Debug for Iter<'_, K, V> {
/// ```
/// use std::collections::HashMap;
///
/// let map = HashMap::from([
/// let mut map = HashMap::from([
/// ("a", 1),
/// ]);
/// let iter = map.iter_mut();
Expand Down Expand Up @@ -1383,7 +1383,7 @@ impl<K, V: Debug> fmt::Debug for Values<'_, K, V> {
/// ```
/// use std::collections::HashMap;
///
/// let map = HashMap::from([
/// let mut map = HashMap::from([
/// ("a", 1),
/// ]);
/// let iter = map.drain();
Expand Down Expand Up @@ -1414,7 +1414,7 @@ impl<'a, K, V> Drain<'a, K, V> {
///
/// use std::collections::HashMap;
///
/// let map = HashMap::from([
/// let mut map = HashMap::from([
/// ("a", 1),
/// ]);
/// let iter = map.drain_filter(|_k, v| *v % 2 == 0);
Expand All @@ -1439,7 +1439,7 @@ where
/// ```
/// use std::collections::HashMap;
///
/// let map = HashMap::from([
/// let mut map = HashMap::from([
/// ("a", 1),
/// ]);
/// let iter_values = map.values_mut();
Expand Down

0 comments on commit 72a6974

Please sign in to comment.