Skip to content

Clarify a sentence in the Book #27978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/doc/trpl/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ Because these kinds of situations are relatively rare, use panics sparingly.

In certain circumstances, even though a function may fail, we may want to treat
it as a panic instead. For example, `io::stdin().read_line(&mut buffer)` returns
a `Result<usize>`, when there is an error reading the line. This allows us to
handle and possibly recover from error.
a `Result<usize>`, which can indicate an error if one occurs when reading the line.
This allows us to handle and possibly recover from errors.

If we don't want to handle this error, and would rather just abort the program,
we can use the `unwrap()` method:
Expand Down