From d78fe8764aaa76ade6cc1f60f695ec9485474a08 Mon Sep 17 00:00:00 2001 From: JirCep Date: Sat, 8 Oct 2022 22:02:53 +0200 Subject: [PATCH] Minor corrections Irrefutable pattern receives warning, refutable error, when used unexpectedly. --- src/ch18-02-refutability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch18-02-refutability.md b/src/ch18-02-refutability.md index be3c31765c..29ab7ec48b 100644 --- a/src/ch18-02-refutability.md +++ b/src/ch18-02-refutability.md @@ -61,7 +61,7 @@ the code in the curly brackets, giving it a way to continue validly. Listing patterns instead of `let` We’ve given the code an out! This code is perfectly valid, although it means we -cannot use an irrefutable pattern without receiving an error. If we give `if +cannot use an irrefutable pattern without receiving a warning. If we give `if let` a pattern that will always match, such as `x`, as shown in Listing 18-10, the compiler will give a warning.