File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ fn main() {
26
26
// TODO: uncomment the line above and see the compiler error. The compiler
27
27
// suggests that we define a closure instead.
28
28
29
- // Closures are anonymous, here we are binding them to references
29
+ // Closures are anonymous, here we are binding them to references.
30
30
// Annotation is identical to function annotation but is optional
31
31
// as are the `{}` wrapping the body. These nameless functions
32
32
// are assigned to appropriately named variables.
Original file line number Diff line number Diff line change 3
3
Any type that implements the ` Eq ` and ` Hash ` traits can be a key in ` HashMap ` .
4
4
This includes:
5
5
6
- * ` bool ` (though not very useful since there is only two possible keys)
6
+ * ` bool ` (though not very useful since there are only two possible keys)
7
7
* ` int ` , ` uint ` , and all variations thereof
8
8
* ` String ` and ` &str ` (protip: you can have a ` HashMap ` keyed by ` String `
9
9
and call ` .get() ` with an ` &str ` )
You can’t perform that action at this time.
0 commit comments