Skip to content
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

Fix some translation errors #2

Open
wants to merge 1 commit into
base: master
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/concurrency/parallel/rayon-map-reduce.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![rayon-badge]][rayon] [![cat-concurrency-badge]][cat-concurrency]

这个例子使用[`rayon::filter`],[`rayon::map`],和[`rayon::reduce`],计算`Person`对象的平均年龄,哪个年龄超过 30
这个例子使用[`rayon::filter`],[`rayon::map`],和[`rayon::reduce`],计算年龄超过 30 岁的`Person`对象的平均年龄。

[`rayon::filter`]返回满足给定断言的集合,其中的元素。[`rayon::map`]对每个元素执行一个操作,创建一个新的迭代,然后[`rayon::reduce`]:执行带有一个当前元素,和前一个(执行结果)的操作。还显示了使用[`rayon::sum`],与本例中的 reduce 操作,具有相同的结果。

Expand Down
2 changes: 1 addition & 1 deletion src/concurrency/thread/global-mut-state.zh.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 保持全球可变状态
## 保持全局可变状态

[![lazy_static-badge]][lazy_static] [![cat-rust-patterns-badge]][cat-rust-patterns]

Expand Down
2 changes: 1 addition & 1 deletion src/database/postgres/create_tables.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

使用[`postgres`]在 Postgres 数据库中,创建表。

[`Connection::connect`]帮助连接到现有数据库。该食谱的`Connection::connect`使用一个 URL 字符串格式。 它假定一个名为`library`,用户名是`postgres`,密码是`postgres`.
[`Connection::connect`]帮助连接到现有数据库。该食谱的`Connection::connect`使用一个 URL 字符串格式。它假定现有一个名为`library`的数据库,用户名是`postgres`,密码是`postgres`.

```rust,no_run
extern crate postgres;
Expand Down