Skip to content

Commit 82bed0a

Browse files
author
Matěj Grabovský
committed
Clarify a sentence in the Book
1 parent 797d0ba commit 82bed0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/trpl/error-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ Because these kinds of situations are relatively rare, use panics sparingly.
208208

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

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

0 commit comments

Comments
 (0)