Skip to content

Commit fa3fd81

Browse files
committed
Update error-handling.md
Fix two typos while `io::stdin().read_line()` returns `Result` actually Signed-off-by: acgtyrant <[email protected]>
1 parent 3906edf commit fa3fd81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ we can use the `unwrap()` method:
214214
io::stdin().read_line(&mut buffer).unwrap();
215215
```
216216

217-
`unwrap()` will `panic!` if the `Option` is `None`. This basically says "Give
217+
`unwrap()` will `panic!` if the `Result` is `Err`. This basically says "Give
218218
me the value, and if something goes wrong, just crash." This is less reliable
219219
than matching the error and attempting to recover, but is also significantly
220220
shorter. Sometimes, just crashing is appropriate.

0 commit comments

Comments
 (0)