Skip to content

minor translation updates #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
- [第 30 条:不仅仅是单元测试](./chapter_5/item30-write-more-than-unit-tests.md)
- [第 31 条:使用生态系统工具](./chapter_5/item31-use-tools.md)
- [第 32 条:搭建持续集成(CI)系统](./chapter_5/item32-ci.md)
- [超出标准 Rust](./chapter_6.md)
- [超越标准 Rust](./chapter_6.md)
- [第 33 条:考虑使库代码与 no_std 兼容](./chapter_6/item33-no-std.md)
- [第 34 条:控制跨越 FFI 边界的内容](./chapter_6/item34-ffi.md)
- [第 35 条:优先使用 bindgen 而不是手动 FFI 映射](./chapter_6/item35-bindgen.md)
Expand Down
4 changes: 2 additions & 2 deletions src/chapter_1/item6-newtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ print_page(DoubleSided(true), ColorOutput(false));

另一个[常见]但更巧妙的需要 newtype 模式的场景,是 Rust 的孤儿规则。这个规则意味着,在一个包里,以下条件之一满足时,才能为某个类型实现 trait:

包定义了该 trait
包定义了该类型
- 包定义了该 trait
- 包定义了该类型

我们来尝试为一个外部类型实现一个外部 trait:

Expand Down
2 changes: 1 addition & 1 deletion src/chapter_4.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 依赖项
# 依赖

> "当神想要惩罚我们时,他们会满足我们的祈祷。" —— 奥斯卡·王尔德

Expand Down