From 73a1e3888b989f8f9a51c4282527a5cc3a45a104 Mon Sep 17 00:00:00 2001 From: Martin Torp Date: Sun, 4 Oct 2020 18:09:08 +0200 Subject: [PATCH] clarify description of when ? can be used --- src/ch09-02-recoverable-errors-with-result.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch09-02-recoverable-errors-with-result.md b/src/ch09-02-recoverable-errors-with-result.md index c8d197d126..2ed357c065 100644 --- a/src/ch09-02-recoverable-errors-with-result.md +++ b/src/ch09-02-recoverable-errors-with-result.md @@ -389,7 +389,7 @@ The `?` operator can be used in functions that have a return type of `Result`, because it is defined to work in the same way as the `match` expression we defined in Listing 9-6. The part of the `match` that requires a return type of `Result` is `return Err(e)`, so the return type of the function -can be a `Result` to be compatible with this `return`. +has to be a `Result` to be compatible with this `return`. Let’s look at what happens if we use the `?` operator in the `main` function, which you’ll recall has a return type of `()`: