Skip to content

Commit

Permalink
Rollup merge of rust-lang#31145 - D101101:patch-1, r=steveklabnik
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Jan 23, 2016
2 parents 96dbd8a + 6a6e9a9 commit bd4c0b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/doc/book/guessing-game.md
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ let guess: u32 = match guess.trim().parse() {
```
This is how you generally move from ‘crash on error’ to ‘actually handle the
error’, by switching from `expect()` to a `match` statement. The `Result`
returned by `parse()` is an `enum` like `Ordering`, but in this case, each
variant has some data associated with it: `Ok` is a success, and `Err` is a
failure. Each contains more information: the successfully parsed integer, or an
Expand Down

0 comments on commit bd4c0b5

Please sign in to comment.