File tree 4 files changed +4
-4
lines changed 4 files changed +4
-4
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 ` )
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ fn main() {
62
62
}
63
63
}
64
64
65
- // The output is wrapped in a Result to allow matching on errors
65
+ // The output is wrapped in a Result to allow matching on errors.
66
66
// Returns an Iterator to the Reader of the lines of the file.
67
67
fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
68
68
where P: AsRef<Path>, {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ use std::thread;
30
30
fn main() {
31
31
32
32
// This is our data to process.
33
- // We will calculate the sum of all digits via a threaded map-reduce algorithm.
33
+ // We will calculate the sum of all digits via a threaded map-reduce algorithm.
34
34
// Each whitespace separated chunk will be handled in a different thread.
35
35
//
36
36
// TODO: see what happens to the output if you insert spaces!
You can’t perform that action at this time.
0 commit comments