From 0340a068747cee180981439a44f683e3da415bed Mon Sep 17 00:00:00 2001 From: Li Lanjun <35945793+mylvghb@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:51:36 +0800 Subject: [PATCH] Update ownership.md --- src/basic/ownership/ownership.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/ownership/ownership.md b/src/basic/ownership/ownership.md index c5458bf6..6ad57ac2 100644 --- a/src/basic/ownership/ownership.md +++ b/src/basic/ownership/ownership.md @@ -114,7 +114,7 @@ let s = "hello"; let s = String::from("hello"); ``` -`::` 是一种调用操作符,这里表示调用 `String` 模块中的 `from` 方法,由于 `String` 类型存储在堆上,因此它是动态的,你可以这样修改: +`::` 是一种调用操作符,这里表示调用 `String` 类型中的 `from` 关联函数,由于 `String` 类型存储在堆上,因此它是动态的,你可以这样修改: ```rust let mut s = String::from("hello");