Skip to content

Commit 79ca74d

Browse files
committed
Rollup merge of rust-lang#25242 - acgtyrant:patch-3, r=Manishearth
Fix a typo while `io::stdin().read_line()` returns `Result` actually
2 parents 15c9f44 + fa3fd81 commit 79ca74d

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)