From e4e9ba786632dafc0dcf4975d7516a3db7d80b9d Mon Sep 17 00:00:00 2001 From: Veera Date: Fri, 14 Jul 2023 18:29:20 -0400 Subject: [PATCH] Refutability: Mention `let`-`else` statement --- src/ch18-02-refutability.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ch18-02-refutability.md b/src/ch18-02-refutability.md index be3c31765c..d78fb51f83 100644 --- a/src/ch18-02-refutability.md +++ b/src/ch18-02-refutability.md @@ -10,11 +10,11 @@ a_value` because if the value in the `a_value` variable is `None` rather than Function parameters, `let` statements, and `for` loops can only accept irrefutable patterns, because the program cannot do anything meaningful when -values don’t match. The `if let` and `while let` expressions accept -refutable and irrefutable patterns, but the compiler warns against -irrefutable patterns because by definition they’re intended to handle possible -failure: the functionality of a conditional is in its ability to perform -differently depending on success or failure. +values don’t match. The `if let` and `while let` expressions and the +`let`-`else` statement accept refutable and irrefutable patterns, but the +compiler warns against irrefutable patterns because by definition they’re intended +to handle possible failure: the functionality of a conditional is in its ability +to perform differently depending on success or failure. In general, you shouldn’t have to worry about the distinction between refutable and irrefutable patterns; however, you do need to be familiar with the concept