Skip to content

Commit 6a6e9a9

Browse files
committed
Fix the missing line in the guessing-game.md
r? @steveklabnik
1 parent 8ff48fe commit 6a6e9a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/doc/book/guessing-game.md

+1
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,7 @@ let guess: u32 = match guess.trim().parse() {
908908
```
909909
910910
This is how you generally move from ‘crash on error’ to ‘actually handle the
911+
error’, by switching from `expect()` to a `match` statement. The `Result`
911912
returned by `parse()` is an `enum` like `Ordering`, but in this case, each
912913
variant has some data associated with it: `Ok` is a success, and `Err` is a
913914
failure. Each contains more information: the successfully parsed integer, or an

0 commit comments

Comments
 (0)