Skip to content

Commit 80122b2

Browse files
committed
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.
2 parents 0c72f69 + 6e98593 commit 80122b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/guessing-game.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ done:
258258
io::stdin().read_line(&mut guess).expect("failed to read line");
259259
```
260260

261-
But that gets hard to read. So we’ve split it up, three lines for three method
261+
But that gets hard to read. So we’ve split it up, two lines for two method
262262
calls. We already talked about `read_line()`, but what about `expect()`? Well,
263263
we already mentioned that `read_line()` puts what the user types into the `&mut
264264
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,
644644
Rust doesn’t know how to compare the `guess` and the `secret_number`. They
645645
need to be the same type. Ultimately, we want to convert the `String` we
646646
read as input into a real number type, for comparison. We can do that
647-
with three more lines. Here’s our new program:
647+
with two more lines. Here’s our new program:
648648
649649
```rust,ignore
650650
extern crate rand;

0 commit comments

Comments
 (0)