From 4d4bb8a287b2890839b0ccc0eb10d303675aa674 Mon Sep 17 00:00:00 2001 From: ButterBlock233 Date: Fri, 8 Sep 2023 18:13:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E9=94=99=E8=AF=AF=E7=9A=84=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E4=BB=A3=E7=A0=81=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=98=BE?= =?UTF-8?q?=E7=9C=BC=E7=9A=84=E6=8F=90=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/basic/trait/generic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/trait/generic.md b/src/basic/trait/generic.md index 8a78b657..2d30f1c0 100644 --- a/src/basic/trait/generic.md +++ b/src/basic/trait/generic.md @@ -59,7 +59,7 @@ fn largest(list: &[T]) -> T { 总之,我们可以这样理解这个函数定义:函数 `largest` 有泛型类型 `T`,它有个参数 `list`,其类型是元素为 `T` 的数组切片,最后,该函数返回值的类型也是 `T`。 -具体的泛型函数实现如下: +下面是一个错误的泛型函数的实现: ```rust fn largest(list: &[T]) -> T {