Skip to content

Commit

Permalink
Merge pull request #1759 from trueNAHO/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
marioidival authored Oct 31, 2023
2 parents 5b11b72 + 1722ff5 commit b26672d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/fn/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() {
// TODO: uncomment the line above and see the compiler error. The compiler
// suggests that we define a closure instead.
// Closures are anonymous, here we are binding them to references
// Closures are anonymous, here we are binding them to references.
// Annotation is identical to function annotation but is optional
// as are the `{}` wrapping the body. These nameless functions
// are assigned to appropriately named variables.
Expand Down
2 changes: 1 addition & 1 deletion src/std/hash/alt_key_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Any type that implements the `Eq` and `Hash` traits can be a key in `HashMap`.
This includes:

* `bool` (though not very useful since there is only two possible keys)
* `bool` (though not very useful since there are only two possible keys)
* `int`, `uint`, and all variations thereof
* `String` and `&str` (protip: you can have a `HashMap` keyed by `String`
and call `.get()` with an `&str`)
Expand Down
2 changes: 1 addition & 1 deletion src/std_misc/file/read_lines.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() {
}
}
// The output is wrapped in a Result to allow matching on errors
// The output is wrapped in a Result to allow matching on errors.
// Returns an Iterator to the Reader of the lines of the file.
fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
where P: AsRef<Path>, {
Expand Down
2 changes: 1 addition & 1 deletion src/std_misc/threads/testcase_mapreduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use std::thread;
fn main() {
// This is our data to process.
// We will calculate the sum of all digits via a threaded map-reduce algorithm.
// We will calculate the sum of all digits via a threaded map-reduce algorithm.
// Each whitespace separated chunk will be handled in a different thread.
//
// TODO: see what happens to the output if you insert spaces!
Expand Down

0 comments on commit b26672d

Please sign in to comment.