From 7c89306d651a8d45feeb87bf5c5f62bebc5d7eee Mon Sep 17 00:00:00 2001 From: Jay Hsu Date: Mon, 8 Apr 2024 11:50:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E6=9F=90=E4=B8=AA=E5=AD=97=E6=AE=B5=E7=9A=84=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E7=9A=84=E5=88=86=E6=94=AF=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/basic/match-pattern/all-patterns.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basic/match-pattern/all-patterns.md b/src/basic/match-pattern/all-patterns.md index 2d6058f5..7e33f3c0 100644 --- a/src/basic/match-pattern/all-patterns.md +++ b/src/basic/match-pattern/all-patterns.md @@ -161,8 +161,8 @@ fn main() { ``` 首先是 `match` 第一个分支,指定匹配 `y` 为 `0` 的 `Point`; -然后第二个分支在第一个分支之后,匹配 `y` 不为 `0`,`x` 为 `0` 的 `Point`; -最后一个分支匹配 `x` 不为 `0`,`y` 也不为 `0` 的 `Point`。 +然后第二个分支在第一个分支之后,指定匹配 `x` 为 `0` 的 `Point`; +最后一个分支匹配 `x` 和 `y` 为任意值的 `Point`。 在这个例子中,值 `p` 因为其 `x` 包含 0 而匹配第二个分支,因此会打印出 `On the y axis at 7`。