Skip to content

Commit 451a1e3

Browse files
authored
Merge pull request #2471 from mtorp/master
clarify description of when ? can be used
2 parents cb28dee + 73a1e38 commit 451a1e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ch09-02-recoverable-errors-with-result.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ The `?` operator can be used in functions that have a return type of
389389
`Result`, because it is defined to work in the same way as the `match`
390390
expression we defined in Listing 9-6. The part of the `match` that requires a
391391
return type of `Result` is `return Err(e)`, so the return type of the function
392-
can be a `Result` to be compatible with this `return`.
392+
has to be a `Result` to be compatible with this `return`.
393393

394394
Let’s look at what happens if we use the `?` operator in the `main` function,
395395
which you’ll recall has a return type of `()`:

0 commit comments

Comments
 (0)