Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
原文:Therefore, any automatic copying can be assumed to be inexpensive in terms of runtime performance.
  • Loading branch information
goverclock authored Nov 17, 2023
1 parent 92f80c7 commit 7dbb8fb
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 7dbb8fb

Please # to comment.