mirror of
https://github.com/RustyCab/LearnRustEasy.git
synced 2026-02-04 10:43:22 +08:00
Update chapter_3_7_1.md
This commit is contained in:
@@ -195,7 +195,7 @@ s是String类型,字符串“Hello world!”是存储在堆内存上的,
|
||||
|
||||

|
||||
|
||||
显然,**Rust中变量赋值(Rust中叫所有权转移)使用的是浅拷贝。**
|
||||
显然,**Rust中变量赋值(Rust中叫所有权转移)使用的是浅拷贝**。
|
||||
|
||||
#### 6. Clone
|
||||
当需要拷贝堆上的数据时,可以使用clone方法,完成深拷贝的操作,如下:
|
||||
|
||||
Reference in New Issue
Block a user