From 10663a5649bd35b2d940f3638b54bebcc7670254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Wed, 18 May 2022 15:32:29 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=A1=A5=E5=85=85new=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/basic/method.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/method.md b/src/basic/method.md index d890a0e3..d35d24b4 100644 --- a/src/basic/method.md +++ b/src/basic/method.md @@ -20,7 +20,7 @@ struct Circle { } impl Circle { - // new是Circle的关联函数,因为它的第一个参数不是self + // new是Circle的关联函数,因为它的第一个参数不是self,且new并不是关键字 // 这种方法往往用于初始化当前结构体的实例 fn new(x: f64, y: f64, radius: f64) -> Circle { Circle {