From 8ca8c9529db704e55e942027f0ccfbf6aa94d47f Mon Sep 17 00:00:00 2001 From: sweet2honey <494632472@qq.com> Date: Tue, 19 Apr 2022 23:57:34 +0800 Subject: [PATCH] Squashed commit: fix typo. --- src/basic/match-pattern/all-patterns.md | 2 +- src/basic/match-pattern/match-if-let.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/basic/match-pattern/all-patterns.md b/src/basic/match-pattern/all-patterns.md index 7ef7c049..d09ce849 100644 --- a/src/basic/match-pattern/all-patterns.md +++ b/src/basic/match-pattern/all-patterns.md @@ -451,7 +451,7 @@ error: `..` can only be used once per tuple pattern // 每个元组模式只能 error: could not compile `world_hello` due to previous error ^^ ``` -Rust 无法判断,`second` 应该匹配 `numbers` 中的第几个元素,因此这里使用两个 `..` 模式,是由很大歧义的! +Rust 无法判断,`second` 应该匹配 `numbers` 中的第几个元素,因此这里使用两个 `..` 模式,是有很大歧义的! ### 匹配守卫提供的额外条件 diff --git a/src/basic/match-pattern/match-if-let.md b/src/basic/match-pattern/match-if-let.md index 0ea112d3..731c4ee6 100644 --- a/src/basic/match-pattern/match-if-let.md +++ b/src/basic/match-pattern/match-if-let.md @@ -92,7 +92,6 @@ enum IpAddr { } fn main() { - // let d_panic = Direction::South; let ip1 = IpAddr::Ipv6; let ip_str = match ip1 { IpAddr::Ipv4 => "127.0.0.1",