Skip to content

Commit

Permalink
Merge pull request #749 from goverclock/patch-1
Browse files Browse the repository at this point in the history
fix: typo
  • Loading branch information
KaiserY authored Nov 17, 2023
2 parents 92f80c7 + 7dbb8fb commit a9b8de1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch04-01-what-is-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ access the heap data." src="img/trpl04-04.svg" class="center" style="width:

这样就解决了我们的问题!因为只有 `s2` 是有效的,当其离开作用域,它就释放自己的内存,完毕。

另外,这里还隐含了一个设计选择:Rust 永远也不会自动创建数据的 “深拷贝”。因此,任何 **自动** 的复制可以被认为对运行时性能影响较小
另外,这里还隐含了一个设计选择:Rust 永远也不会自动创建数据的 “深拷贝”。因此,任何 **自动** 的复制都可以被认为是对运行时性能影响较小的

<a id="ways-variables-and-data-interact-clone"></a>

Expand Down

0 comments on commit a9b8de1

Please # to comment.