diff options
| author | bors <bors@rust-lang.org> | 2016-02-21 11:15:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-21 11:15:13 +0000 |
| commit | 80122b2248a6168f38fdb8b532e0cdf5f6c01ba8 (patch) | |
| tree | e107bb701a2b3f3b02b79fdbc51d5846917306fd /src | |
| parent | 0c72f697eb0630f3d7218a298ea1a7b77289ea8a (diff) | |
| parent | 6e985934bdd29579b7df5ad092f44d41ed2cf799 (diff) | |
Auto merge of #31799 - cshaffer:book-fixes, r=steveklabnik
I noticed a few PRs fixing some of the words around the code refactor in the guessing game tutorial, this should be all that's left.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/book/guessing-game.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/book/guessing-game.md b/src/doc/book/guessing-game.md index a5259e9ca4c..22b756f7bb4 100644 --- a/src/doc/book/guessing-game.md +++ b/src/doc/book/guessing-game.md @@ -258,7 +258,7 @@ done: io::stdin().read_line(&mut guess).expect("failed to read line"); ``` -But that gets hard to read. So we’ve split it up, three lines for three method +But that gets hard to read. So we’ve split it up, two lines for two method calls. We already talked about `read_line()`, but what about `expect()`? Well, we already mentioned that `read_line()` puts what the user types into the `&mut String` we pass it. But it also returns a value: in this case, an @@ -644,7 +644,7 @@ So far, that hasn’t mattered, and so Rust defaults to an `i32`. However, here, Rust doesn’t know how to compare the `guess` and the `secret_number`. They need to be the same type. Ultimately, we want to convert the `String` we read as input into a real number type, for comparison. We can do that -with three more lines. Here’s our new program: +with two more lines. Here’s our new program: ```rust,ignore extern crate rand; |
