Fix typo in 02_match (#296)

This commit is contained in:
Marcin authored and GitHub committed 2025-09-03 08:28:37 -07:00
1 parent af4fe9cedb
commit c3cb1b38f6
1 file changed
+1 -1
+1 -1
View File
@@ -70,7 +70,7 @@ match status {
The `_` pattern matches anything that wasn't matched by the previous patterns. The `_` pattern matches anything that wasn't matched by the previous patterns.
<div class="warning"> <div class="warning">
By using this catch-all pattern, you _won't_ get the benefits of compiler-driven refactoring.\ By using this catch-all pattern, you _won't_ get the benefits of compiler-driven refactoring.
If you add a new enum variant, the compiler _won't_ tell you that you're not handling it. If you add a new enum variant, the compiler _won't_ tell you that you're not handling it.
If you're keen on correctness, avoid using catch-alls. Leverage the compiler to re-examine all matching sites and determine how new enum variants should be handled. If you're keen on correctness, avoid using catch-alls. Leverage the compiler to re-examine all matching sites and determine how new enum variants should be handled.