From 9e4a9c33083c727d2e24cbad2865192593878613 Mon Sep 17 00:00:00 2001 From: WuTao18 <1586912545@qq.com> Date: Wed, 15 Feb 2023 20:16:44 +0800 Subject: [PATCH] Fix some translation errors --- src/concurrency/parallel/rayon-map-reduce.zh.md | 2 +- src/concurrency/thread/global-mut-state.zh.md | 2 +- src/database/postgres/create_tables.zh.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/concurrency/parallel/rayon-map-reduce.zh.md b/src/concurrency/parallel/rayon-map-reduce.zh.md index 08431d6..4f93067 100644 --- a/src/concurrency/parallel/rayon-map-reduce.zh.md +++ b/src/concurrency/parallel/rayon-map-reduce.zh.md @@ -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 操作,具有相同的结果。 diff --git a/src/concurrency/thread/global-mut-state.zh.md b/src/concurrency/thread/global-mut-state.zh.md index 5999531..e3a7f01 100644 --- a/src/concurrency/thread/global-mut-state.zh.md +++ b/src/concurrency/thread/global-mut-state.zh.md @@ -1,4 +1,4 @@ -## 保持全球可变状态 +## 保持全局可变状态 [![lazy_static-badge]][lazy_static] [![cat-rust-patterns-badge]][cat-rust-patterns] diff --git a/src/database/postgres/create_tables.zh.md b/src/database/postgres/create_tables.zh.md index 3ede36e..3fb573d 100644 --- a/src/database/postgres/create_tables.zh.md +++ b/src/database/postgres/create_tables.zh.md @@ -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;