From 7448984c653ded7d270969b56199e5ea60af10b0 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Fri, 4 Oct 2024 11:00:34 -0400 Subject: [PATCH] fix translation issue --- src/ch06-01-defining-an-enum.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch06-01-defining-an-enum.md b/src/ch06-01-defining-an-enum.md index 730398f..4710ded 100644 --- a/src/ch06-01-defining-an-enum.md +++ b/src/ch06-01-defining-an-enum.md @@ -26,7 +26,7 @@ {{#rustdoc_include ../listings/ch06-enums-and-pattern-matching/no-listing-01-defining-enums/src/main.rs:instance}} ``` -注意枚举的成员位于其标识符的命名空间中,并使用两个冒号分开。这么设计的益处是现在 `IpAddrKind::V4` 和 `IpAddrKind::V6` 都是 `IpAddrKind` 类型的。例如,接着可以定义一个函数来获取任何 `IpAddrKind`: +注意枚举的成员位于其标识符的命名空间中,并使用两个冒号分开。这么设计的益处是现在 `IpAddrKind::V4` 和 `IpAddrKind::V6` 都是 `IpAddrKind` 类型的。例如,接着可以定义一个函数来接收任何 `IpAddrKind`类型的参数: ```rust {{#rustdoc_include ../listings/ch06-enums-and-pattern-matching/no-listing-01-defining-enums/src/main.rs:fn}}