mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 20:34:52 -06:00
Merge pull request #258 from bruceadams/master
Correct Ok return value for read_line #257
This commit is contained in:
@@ -273,8 +273,8 @@ argument to `expect`. In this case, if the `read_line` method returns an
|
|||||||
`Err`, it would likely be the result of an error coming from the underlying
|
`Err`, it would likely be the result of an error coming from the underlying
|
||||||
operating system. If this instance of `io::Result` is an `Ok` value, `expect`
|
operating system. If this instance of `io::Result` is an `Ok` value, `expect`
|
||||||
will take the return value that `Ok` is holding and return just that value to
|
will take the return value that `Ok` is holding and return just that value to
|
||||||
us so that we can use it. In this case, that value will be what the user
|
us so that we can use it. In this case, that value is the number of
|
||||||
entered into standard input.
|
characters the user entered into standard input.
|
||||||
|
|
||||||
[expect]: ../std/result/enum.Result.html#method.expect
|
[expect]: ../std/result/enum.Result.html#method.expect
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user