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.
This commit is contained in:
bors 2016-02-21 11:15:13 +00:00
commit 80122b2248

View File

@ -258,7 +258,7 @@ done:
io::stdin().read_line(&mut guess).expect("failed to read line");
```
But that gets hard to read. So weve split it up, three lines for three method
But that gets hard to read. So weve 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 hasnt mattered, and so Rust defaults to an `i32`. However, here,
Rust doesnt 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. Heres our new program:
with two more lines. Heres our new program:
```rust,ignore
extern crate rand;