Skip to content

Commit 06e4365

Browse files
committed
HashMap: also add "Usage with custom key types" heading
1 parent c0a3e48 commit 06e4365

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ use crate::ops::Index;
169169
/// player_stats.entry("mana").and_modify(|mana| *mana += 200).or_insert(100);
170170
/// ```
171171
///
172+
/// ## Usage with custom key types
173+
///
172174
/// The easiest way to use `HashMap` with a custom key type is to derive [`Eq`] and [`Hash`].
173175
/// We must also derive [`PartialEq`].
174176
///

0 commit comments

Comments
 (0)