Skip to content

Commit 06c7432

Browse files
committed
Fix confusing sentence about let else
1 parent 8695fc2 commit 06c7432

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ch19-02-refutability.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ pattern `Some(x)`, Rust rightfully produces a compiler error.
5050

5151
If we have a refutable pattern where an irrefutable pattern is needed, we can
5252
fix it by changing the code that uses the pattern: Instead of using `let`, we
53-
can use `let else`. Then, if the pattern doesn’t match, the code will just skip
54-
the code in the curly brackets, giving it a way to continue validly. Listing
55-
19-9 shows how to fix the code in Listing 19-8.
53+
can use `let else`. Then, if the pattern doesn’t match, the code in the curly
54+
brackets will handle the nonmatching value. Listing 19-9 shows how to fix the
55+
code in Listing 19-8.
5656

5757
<Listing number="19-9" caption="Using `let...else` and a block with refutable patterns instead of `let`">
5858

0 commit comments

Comments
 (0)