From ed7eb9e045479b2faed859d9bf8b54bafbbddbc8 Mon Sep 17 00:00:00 2001 From: Jie Liang Date: Mon, 15 Jul 2019 05:24:12 -0500 Subject: [PATCH] Update 22_Generics.md --- source/chapter2/22_Generics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/22_Generics.md b/source/chapter2/22_Generics.md index 2650fef3..3035fce8 100644 --- a/source/chapter2/22_Generics.md +++ b/source/chapter2/22_Generics.md @@ -435,7 +435,7 @@ protocol Container { 要遵守 `Container` 协议,`Item` 类型也必须遵守 `Equatable` 协议。 -### 在关联类型约束里使用协议 {#using-a-protocol-in-its-associated-type’s-constraints} +### 在关联类型约束里使用协议 {#using-a-protocol-in-its-associated-types-constraints} 协议可以作为它自身的要求出现。例如,有一个协议细化了 `Container` 协议,添加了一个` suffix(_:)` 方法。`suffix(_:)` 方法返回容器中从后往前给定数量的元素,并把它们存储在一个 `Suffix` 类型的实例里。