From 9fa98b9dfbb4380e050e79783015722edbaa94a7 Mon Sep 17 00:00:00 2001 From: 0xmingx Date: Thu, 13 Oct 2022 23:47:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这里应该是 `let` 和 `if let` 做比较 --- src/basic/match-pattern/pattern-match.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/match-pattern/pattern-match.md b/src/basic/match-pattern/pattern-match.md index 5b8837e5..3e823445 100644 --- a/src/basic/match-pattern/pattern-match.md +++ b/src/basic/match-pattern/pattern-match.md @@ -145,7 +145,7 @@ fn main() { `&(3, 5)` 会匹配模式 `&(x, y)`,因此 `x` 得到了 `3`,`y` 得到了 `5`。 -#### if 和 if let +#### let 和 if let 对于以下代码,编译器会报错: