Skip to content

Commit

Permalink
润色
Browse files Browse the repository at this point in the history
  • Loading branch information
mokurin000 committed Jan 11, 2022
1 parent 5863307 commit 0a04f11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion anti_patterns/borrow_clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ println!("{}", x);

此外要保证一直给你的项目跑`cargo clippy`,它可以判断一些`.clone()`调用不必要的情况,比如[](https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone)[](https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy)[](https://rust-lang.github.io/rust-clippy/master/index.html#map_clone)或者[](https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref).

## 另见
## 参见

- [`mem::{take(_), replace(_)}`在被更改的枚举中保持拥有的值](../idioms/mem-replace.md)
- [`Rc<T>`文档,它智能地处理.clone()](http://doc.rust-lang.org/std/rc/)
Expand Down
2 changes: 1 addition & 1 deletion patterns/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ fn main() {
说到性能,在性能和代码的简易性、组织性间我们总需要权衡。
静态分发可以提供更好的性能,而动态分发在我们组织应用程序时提供了灵活性。

## 另见
## 参见

- [命令模式](https://zh.wikipedia.org/wiki/%E5%91%BD%E4%BB%A4%E6%A8%A1%E5%BC%8F)

Expand Down

0 comments on commit 0a04f11

Please sign in to comment.