diff --git a/po/zh-CN.po b/po/zh-CN.po
index 0cefd030..728424e1 100644
--- a/po/zh-CN.po
+++ b/po/zh-CN.po
@@ -1,37 +1,44 @@
+
msgid ""
msgstr ""
"Project-Id-Version: Comprehensive Rust 🦀\n"
-"POT-Creation-Date: 2023-10-05T20:31:13-07:00\n"
-"PO-Revision-Date: 2023-06-12 21:28-0700\n"
+"POT-Creation-Date: 2023-10-06T11:02:48-07:00\n"
+"PO-Revision-Date: 2023-09-11 10:30-0700\n"
"Last-Translator: \n"
"Language-Team: Language zh-Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: zh-Hans\n"
+"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: src/SUMMARY.md:4 src/index.md:1
+#: src/SUMMARY.md:4
+#: src/index.md:1
msgid "Welcome to Comprehensive Rust 🦀"
msgstr "欢迎来到 Comprehensive Rust 🦀"
-#: src/SUMMARY.md:5 src/running-the-course.md:1
+#: src/SUMMARY.md:5
+#: src/running-the-course.md:1
msgid "Running the Course"
msgstr "授课"
-#: src/SUMMARY.md:6 src/running-the-course/course-structure.md:1
+#: src/SUMMARY.md:6
+#: src/running-the-course/course-structure.md:1
msgid "Course Structure"
msgstr "课程结构"
-#: src/SUMMARY.md:7 src/running-the-course/keyboard-shortcuts.md:1
+#: src/SUMMARY.md:7
+#: src/running-the-course/keyboard-shortcuts.md:1
msgid "Keyboard Shortcuts"
msgstr "键盘快捷键"
-#: src/SUMMARY.md:8 src/running-the-course/translations.md:1
+#: src/SUMMARY.md:8
+#: src/running-the-course/translations.md:1
msgid "Translations"
msgstr "翻译"
-#: src/SUMMARY.md:9 src/cargo.md:1
+#: src/SUMMARY.md:9
+#: src/cargo.md:1
msgid "Using Cargo"
msgstr "使用 Cargo"
@@ -51,65 +58,84 @@ msgstr "在本地运行 Cargo"
msgid "Day 1: Morning"
msgstr "第一天:早上"
-#: src/SUMMARY.md:19 src/SUMMARY.md:80 src/SUMMARY.md:135 src/SUMMARY.md:193
-#: src/SUMMARY.md:219 src/SUMMARY.md:269
+#: src/SUMMARY.md:19
+#: src/SUMMARY.md:80
+#: src/SUMMARY.md:135
+#: src/SUMMARY.md:193
+#: src/SUMMARY.md:219
+#: src/SUMMARY.md:269
msgid "Welcome"
msgstr "欢迎"
-#: src/SUMMARY.md:20 src/welcome-day-1/what-is-rust.md:1
+#: src/SUMMARY.md:20
+#: src/welcome-day-1/what-is-rust.md:1
msgid "What is Rust?"
msgstr "什么是 Rust?"
-#: src/SUMMARY.md:21 src/hello-world.md:1
+#: src/SUMMARY.md:21
+#: src/hello-world.md:1
msgid "Hello World!"
msgstr "Hello World!"
-#: src/SUMMARY.md:22 src/hello-world/small-example.md:1
+#: src/SUMMARY.md:22
+#: src/hello-world/small-example.md:1
msgid "Small Example"
msgstr "简短示例"
-#: src/SUMMARY.md:23 src/why-rust.md:1
+#: src/SUMMARY.md:23
+#: src/why-rust.md:1
msgid "Why Rust?"
msgstr "为什么选择 Rust?"
-#: src/SUMMARY.md:24 src/why-rust/an-example-in-c.md:1 src/credits.md:32
+#: src/SUMMARY.md:24
+#: src/why-rust/an-example-in-c.md:1
+#: src/credits.md:32
#, fuzzy
msgid "An Example in C"
msgstr "C++ 示例"
-#: src/SUMMARY.md:25 src/why-rust/compile-time.md:1
+#: src/SUMMARY.md:25
+#: src/why-rust/compile-time.md:1
msgid "Compile Time Guarantees"
msgstr "编译期保障"
-#: src/SUMMARY.md:26 src/why-rust/runtime.md:1
+#: src/SUMMARY.md:26
+#: src/why-rust/runtime.md:1
msgid "Runtime Guarantees"
msgstr "运行时保障"
-#: src/SUMMARY.md:27 src/why-rust/modern.md:1
+#: src/SUMMARY.md:27
+#: src/why-rust/modern.md:1
msgid "Modern Features"
msgstr "现代特性"
-#: src/SUMMARY.md:28 src/basic-syntax.md:1
+#: src/SUMMARY.md:28
+#: src/basic-syntax.md:1
msgid "Basic Syntax"
msgstr "基本语法"
-#: src/SUMMARY.md:29 src/basic-syntax/scalar-types.md:1
+#: src/SUMMARY.md:29
+#: src/basic-syntax/scalar-types.md:1
msgid "Scalar Types"
msgstr "标量类型"
-#: src/SUMMARY.md:30 src/basic-syntax/compound-types.md:1
+#: src/SUMMARY.md:30
+#: src/basic-syntax/compound-types.md:1
msgid "Compound Types"
msgstr "复合类型"
-#: src/SUMMARY.md:31 src/basic-syntax/references.md:1
+#: src/SUMMARY.md:31
+#: src/basic-syntax/references.md:1
msgid "References"
msgstr "引用"
-#: src/SUMMARY.md:32 src/basic-syntax/references-dangling.md:1
+#: src/SUMMARY.md:32
+#: src/basic-syntax/references-dangling.md:1
msgid "Dangling References"
msgstr "悬垂引用"
-#: src/SUMMARY.md:33 src/basic-syntax/slices.md:1
+#: src/SUMMARY.md:33
+#: src/basic-syntax/slices.md:1
msgid "Slices"
msgstr "切片"
@@ -117,15 +143,19 @@ msgstr "切片"
msgid "String vs str"
msgstr "String 和 str"
-#: src/SUMMARY.md:35 src/basic-syntax/functions.md:1
+#: src/SUMMARY.md:35
+#: src/basic-syntax/functions.md:1
msgid "Functions"
msgstr "函数"
-#: src/SUMMARY.md:36 src/basic-syntax/rustdoc.md:1
+#: src/SUMMARY.md:36
+#: src/basic-syntax/rustdoc.md:1
msgid "Rustdoc"
msgstr "Rustdoc"
-#: src/SUMMARY.md:37 src/SUMMARY.md:103 src/basic-syntax/methods.md:1
+#: src/SUMMARY.md:37
+#: src/SUMMARY.md:103
+#: src/basic-syntax/methods.md:1
#: src/methods.md:1
msgid "Methods"
msgstr "方法"
@@ -134,17 +164,27 @@ msgstr "方法"
msgid "Overloading"
msgstr "重载"
-#: src/SUMMARY.md:39 src/SUMMARY.md:72 src/SUMMARY.md:106 src/SUMMARY.md:126
-#: src/SUMMARY.md:155 src/SUMMARY.md:185 src/SUMMARY.md:212 src/SUMMARY.md:233
-#: src/SUMMARY.md:261 src/SUMMARY.md:283 src/SUMMARY.md:304
-#: src/exercises/android/morning.md:1 src/exercises/bare-metal/morning.md:1
+#: src/SUMMARY.md:39
+#: src/SUMMARY.md:72
+#: src/SUMMARY.md:106
+#: src/SUMMARY.md:126
+#: src/SUMMARY.md:155
+#: src/SUMMARY.md:185
+#: src/SUMMARY.md:212
+#: src/SUMMARY.md:233
+#: src/SUMMARY.md:261
+#: src/SUMMARY.md:283
+#: src/SUMMARY.md:304
+#: src/exercises/android/morning.md:1
+#: src/exercises/bare-metal/morning.md:1
#: src/exercises/bare-metal/afternoon.md:1
#: src/exercises/concurrency/morning.md:1
#: src/exercises/concurrency/afternoon.md:1
msgid "Exercises"
msgstr "习题"
-#: src/SUMMARY.md:40 src/exercises/day-1/implicit-conversions.md:1
+#: src/SUMMARY.md:40
+#: src/exercises/day-1/implicit-conversions.md:1
msgid "Implicit Conversions"
msgstr "隐式类型转换"
@@ -156,11 +196,14 @@ msgstr "数组与 for 循环"
msgid "Day 1: Afternoon"
msgstr "第 1 天:下午"
-#: src/SUMMARY.md:45 src/SUMMARY.md:296 src/control-flow.md:1
+#: src/SUMMARY.md:45
+#: src/SUMMARY.md:296
+#: src/control-flow.md:1
msgid "Control Flow"
msgstr "控制流"
-#: src/SUMMARY.md:46 src/control-flow/blocks.md:1
+#: src/SUMMARY.md:46
+#: src/control-flow/blocks.md:1
msgid "Blocks"
msgstr "块"
@@ -184,11 +227,13 @@ msgstr "break & continue"
msgid "loop expressions"
msgstr "loop 表达式"
-#: src/SUMMARY.md:53 src/basic-syntax/variables.md:1
+#: src/SUMMARY.md:53
+#: src/basic-syntax/variables.md:1
msgid "Variables"
msgstr "变量"
-#: src/SUMMARY.md:54 src/basic-syntax/type-inference.md:1
+#: src/SUMMARY.md:54
+#: src/basic-syntax/type-inference.md:1
msgid "Type Inference"
msgstr "类型推导"
@@ -196,23 +241,28 @@ msgstr "类型推导"
msgid "static & const"
msgstr "静态与常量"
-#: src/SUMMARY.md:56 src/basic-syntax/scopes-shadowing.md:1
+#: src/SUMMARY.md:56
+#: src/basic-syntax/scopes-shadowing.md:1
msgid "Scopes and Shadowing"
msgstr "作用域和隐藏 (Shadowing)"
-#: src/SUMMARY.md:57 src/enums.md:1
+#: src/SUMMARY.md:57
+#: src/enums.md:1
msgid "Enums"
msgstr "枚举"
-#: src/SUMMARY.md:58 src/enums/variant-payloads.md:1
+#: src/SUMMARY.md:58
+#: src/enums/variant-payloads.md:1
msgid "Variant Payloads"
msgstr "变体载荷"
-#: src/SUMMARY.md:59 src/enums/sizes.md:1
+#: src/SUMMARY.md:59
+#: src/enums/sizes.md:1
msgid "Enum Sizes"
msgstr "枚举大小"
-#: src/SUMMARY.md:61 src/control-flow/novel.md:1
+#: src/SUMMARY.md:61
+#: src/control-flow/novel.md:1
#, fuzzy
msgid "Novel Control Flow"
msgstr "控制流"
@@ -229,27 +279,34 @@ msgstr "while let 表达式"
msgid "match expressions"
msgstr "match 表达式"
-#: src/SUMMARY.md:66 src/SUMMARY.md:74 src/pattern-matching.md:1
+#: src/SUMMARY.md:66
+#: src/SUMMARY.md:74
+#: src/pattern-matching.md:1
msgid "Pattern Matching"
msgstr "模式匹配"
-#: src/SUMMARY.md:67 src/pattern-matching/destructuring-enums.md:1
+#: src/SUMMARY.md:67
+#: src/pattern-matching/destructuring-enums.md:1
msgid "Destructuring Enums"
msgstr "解构枚举"
-#: src/SUMMARY.md:68 src/pattern-matching/destructuring-structs.md:1
+#: src/SUMMARY.md:68
+#: src/pattern-matching/destructuring-structs.md:1
msgid "Destructuring Structs"
msgstr "解构结构体"
-#: src/SUMMARY.md:69 src/pattern-matching/destructuring-arrays.md:1
+#: src/SUMMARY.md:69
+#: src/pattern-matching/destructuring-arrays.md:1
msgid "Destructuring Arrays"
msgstr "解构数组"
-#: src/SUMMARY.md:70 src/pattern-matching/match-guards.md:1
+#: src/SUMMARY.md:70
+#: src/pattern-matching/match-guards.md:1
msgid "Match Guards"
msgstr "匹配守卫"
-#: src/SUMMARY.md:73 src/exercises/day-1/luhn.md:1
+#: src/SUMMARY.md:73
+#: src/exercises/day-1/luhn.md:1
#: src/exercises/day-1/solutions-afternoon.md:3
msgid "Luhn Algorithm"
msgstr "Luhn 算法"
@@ -258,7 +315,8 @@ msgstr "Luhn 算法"
msgid "Day 2: Morning"
msgstr "第二天:上午"
-#: src/SUMMARY.md:82 src/memory-management.md:1
+#: src/SUMMARY.md:82
+#: src/memory-management.md:1
msgid "Memory Management"
msgstr "内存管理"
@@ -270,11 +328,13 @@ msgstr "栈 vs 堆"
msgid "Stack Memory"
msgstr "栈内存"
-#: src/SUMMARY.md:85 src/memory-management/manual.md:1
+#: src/SUMMARY.md:85
+#: src/memory-management/manual.md:1
msgid "Manual Memory Management"
msgstr "手动内存管理"
-#: src/SUMMARY.md:86 src/memory-management/scope-based.md:1
+#: src/SUMMARY.md:86
+#: src/memory-management/scope-based.md:1
msgid "Scope-Based Memory Management"
msgstr "基于作用域的内存管理"
@@ -286,15 +346,18 @@ msgstr "垃圾回收"
msgid "Rust Memory Management"
msgstr "Rust 内存管理"
-#: src/SUMMARY.md:89 src/ownership.md:1
+#: src/SUMMARY.md:89
+#: src/ownership.md:1
msgid "Ownership"
msgstr "所有权"
-#: src/SUMMARY.md:90 src/ownership/move-semantics.md:1
+#: src/SUMMARY.md:90
+#: src/ownership/move-semantics.md:1
msgid "Move Semantics"
msgstr "移动语义"
-#: src/SUMMARY.md:91 src/ownership/moved-strings-rust.md:1
+#: src/SUMMARY.md:91
+#: src/ownership/moved-strings-rust.md:1
msgid "Moved Strings in Rust"
msgstr "Rust 中移动的字符串"
@@ -302,61 +365,77 @@ msgstr "Rust 中移动的字符串"
msgid "Double Frees in Modern C++"
msgstr "现代 C++ 中的双重释放"
-#: src/SUMMARY.md:93 src/ownership/moves-function-calls.md:1
+#: src/SUMMARY.md:93
+#: src/ownership/moves-function-calls.md:1
msgid "Moves in Function Calls"
msgstr "函数调用中的移动"
-#: src/SUMMARY.md:94 src/ownership/copy-clone.md:1
+#: src/SUMMARY.md:94
+#: src/ownership/copy-clone.md:1
msgid "Copying and Cloning"
msgstr "复制和克隆"
-#: src/SUMMARY.md:95 src/ownership/borrowing.md:1
+#: src/SUMMARY.md:95
+#: src/ownership/borrowing.md:1
msgid "Borrowing"
msgstr "借用"
-#: src/SUMMARY.md:96 src/ownership/shared-unique-borrows.md:1
+#: src/SUMMARY.md:96
+#: src/ownership/shared-unique-borrows.md:1
msgid "Shared and Unique Borrows"
msgstr "共享和唯一的借用"
-#: src/SUMMARY.md:97 src/ownership/lifetimes.md:1
+#: src/SUMMARY.md:97
+#: src/ownership/lifetimes.md:1
msgid "Lifetimes"
msgstr "生命周期"
-#: src/SUMMARY.md:98 src/ownership/lifetimes-function-calls.md:1
+#: src/SUMMARY.md:98
+#: src/ownership/lifetimes-function-calls.md:1
msgid "Lifetimes in Function Calls"
msgstr "函数调用中的生命周期"
-#: src/SUMMARY.md:99 src/ownership/lifetimes-data-structures.md:1
+#: src/SUMMARY.md:99
+#: src/ownership/lifetimes-data-structures.md:1
msgid "Lifetimes in Data Structures"
msgstr "数据结构中的生命周期"
-#: src/SUMMARY.md:100 src/structs.md:1
+#: src/SUMMARY.md:100
+#: src/structs.md:1
msgid "Structs"
msgstr "结构体"
-#: src/SUMMARY.md:101 src/structs/tuple-structs.md:1
+#: src/SUMMARY.md:101
+#: src/structs/tuple-structs.md:1
msgid "Tuple Structs"
msgstr "元组结构体"
-#: src/SUMMARY.md:102 src/structs/field-shorthand.md:1
+#: src/SUMMARY.md:102
+#: src/structs/field-shorthand.md:1
msgid "Field Shorthand Syntax"
msgstr "字段简写语法"
-#: src/SUMMARY.md:104 src/methods/receiver.md:1
+#: src/SUMMARY.md:104
+#: src/methods/receiver.md:1
msgid "Method Receiver"
msgstr "方法接收者"
-#: src/SUMMARY.md:105 src/SUMMARY.md:167 src/SUMMARY.md:282
-#: src/methods/example.md:1 src/concurrency/shared_state/example.md:1
+#: src/SUMMARY.md:105
+#: src/SUMMARY.md:167
+#: src/SUMMARY.md:282
+#: src/methods/example.md:1
+#: src/concurrency/shared_state/example.md:1
msgid "Example"
msgstr "示例"
-#: src/SUMMARY.md:107 src/exercises/day-2/book-library.md:1
+#: src/SUMMARY.md:107
+#: src/exercises/day-2/book-library.md:1
#, fuzzy
msgid "Storing Books"
msgstr "字符串"
-#: src/SUMMARY.md:108 src/exercises/day-2/health-statistics.md:1
+#: src/SUMMARY.md:108
+#: src/exercises/day-2/health-statistics.md:1
#: src/exercises/day-2/solutions-morning.md:151
msgid "Health Statistics"
msgstr "健康统计"
@@ -365,7 +444,8 @@ msgstr "健康统计"
msgid "Day 2: Afternoon"
msgstr "第二天:下午"
-#: src/SUMMARY.md:112 src/std.md:1
+#: src/SUMMARY.md:112
+#: src/std.md:1
msgid "Standard Library"
msgstr "标准库"
@@ -373,7 +453,8 @@ msgstr "标准库"
msgid "Option and Result"
msgstr "Option 和 Result"
-#: src/SUMMARY.md:114 src/std/string.md:1
+#: src/SUMMARY.md:114
+#: src/std/string.md:1
msgid "String"
msgstr "String"
@@ -393,7 +474,8 @@ msgstr "Box"
msgid "Recursive Data Types"
msgstr "递归数据类型"
-#: src/SUMMARY.md:119 src/std/box-niche.md:1
+#: src/SUMMARY.md:119
+#: src/std/box-niche.md:1
msgid "Niche Optimization"
msgstr "小众优化"
@@ -405,27 +487,33 @@ msgstr "Rc"
msgid "Cell/RefCell"
msgstr "Cell/RefCell"
-#: src/SUMMARY.md:122 src/modules.md:1
+#: src/SUMMARY.md:122
+#: src/modules.md:1
msgid "Modules"
msgstr "模块"
-#: src/SUMMARY.md:123 src/modules/visibility.md:1
+#: src/SUMMARY.md:123
+#: src/modules/visibility.md:1
msgid "Visibility"
msgstr "可见性"
-#: src/SUMMARY.md:124 src/modules/paths.md:1
+#: src/SUMMARY.md:124
+#: src/modules/paths.md:1
msgid "Paths"
msgstr "路径"
-#: src/SUMMARY.md:125 src/modules/filesystem.md:1
+#: src/SUMMARY.md:125
+#: src/modules/filesystem.md:1
msgid "Filesystem Hierarchy"
msgstr "文件系统层级结构"
-#: src/SUMMARY.md:127 src/exercises/day-2/iterators-and-ownership.md:1
+#: src/SUMMARY.md:127
+#: src/exercises/day-2/iterators-and-ownership.md:1
msgid "Iterators and Ownership"
msgstr "迭代器和所有权"
-#: src/SUMMARY.md:128 src/exercises/day-2/strings-iterators.md:1
+#: src/SUMMARY.md:128
+#: src/exercises/day-2/strings-iterators.md:1
#: src/exercises/day-2/solutions-afternoon.md:3
msgid "Strings and Iterators"
msgstr "字符串和迭代器"
@@ -434,39 +522,48 @@ msgstr "字符串和迭代器"
msgid "Day 3: Morning"
msgstr "第三天:上午"
-#: src/SUMMARY.md:136 src/generics.md:1
+#: src/SUMMARY.md:136
+#: src/generics.md:1
msgid "Generics"
msgstr "泛型"
-#: src/SUMMARY.md:137 src/generics/data-types.md:1
+#: src/SUMMARY.md:137
+#: src/generics/data-types.md:1
msgid "Generic Data Types"
msgstr "通用数据类型"
-#: src/SUMMARY.md:138 src/generics/methods.md:1
+#: src/SUMMARY.md:138
+#: src/generics/methods.md:1
msgid "Generic Methods"
msgstr "泛型方法"
-#: src/SUMMARY.md:139 src/generics/monomorphization.md:1
+#: src/SUMMARY.md:139
+#: src/generics/monomorphization.md:1
msgid "Monomorphization"
msgstr "单态化"
-#: src/SUMMARY.md:140 src/traits.md:1
+#: src/SUMMARY.md:140
+#: src/traits.md:1
msgid "Traits"
msgstr "特征"
-#: src/SUMMARY.md:141 src/traits/trait-objects.md:1
+#: src/SUMMARY.md:141
+#: src/traits/trait-objects.md:1
msgid "Trait Objects"
msgstr "特征(Trait)对象"
-#: src/SUMMARY.md:142 src/traits/deriving-traits.md:1
+#: src/SUMMARY.md:142
+#: src/traits/deriving-traits.md:1
msgid "Deriving Traits"
msgstr "派生特征"
-#: src/SUMMARY.md:143 src/traits/default-methods.md:1
+#: src/SUMMARY.md:143
+#: src/traits/default-methods.md:1
msgid "Default Methods"
msgstr "默认方法"
-#: src/SUMMARY.md:144 src/traits/trait-bounds.md:1
+#: src/SUMMARY.md:144
+#: src/traits/trait-bounds.md:1
msgid "Trait Bounds"
msgstr "特征边界"
@@ -474,7 +571,8 @@ msgstr "特征边界"
msgid "impl Trait"
msgstr "impl Trait"
-#: src/SUMMARY.md:146 src/traits/important-traits.md:1
+#: src/SUMMARY.md:146
+#: src/traits/important-traits.md:1
msgid "Important Traits"
msgstr "重要特征"
@@ -482,7 +580,8 @@ msgstr "重要特征"
msgid "Iterator"
msgstr "迭代器"
-#: src/SUMMARY.md:148 src/traits/from-iterator.md:1
+#: src/SUMMARY.md:148
+#: src/traits/from-iterator.md:1
msgid "FromIterator"
msgstr "FromIterator"
@@ -514,7 +613,8 @@ msgstr "闭包:Fn、FnMut、FnOnce"
msgid "A Simple GUI Library"
msgstr "一个简单的 GUI 库"
-#: src/SUMMARY.md:157 src/exercises/day-3/solutions-morning.md:142
+#: src/SUMMARY.md:157
+#: src/exercises/day-3/solutions-morning.md:142
msgid "Points and Polygons"
msgstr "点和多边形"
@@ -522,11 +622,13 @@ msgstr "点和多边形"
msgid "Day 3: Afternoon"
msgstr "第三天:下午"
-#: src/SUMMARY.md:161 src/error-handling.md:1
+#: src/SUMMARY.md:161
+#: src/error-handling.md:1
msgid "Error Handling"
msgstr "错误处理"
-#: src/SUMMARY.md:162 src/error-handling/panics.md:1
+#: src/SUMMARY.md:162
+#: src/error-handling/panics.md:1
msgid "Panics"
msgstr "Panics"
@@ -542,68 +644,84 @@ msgstr "结构化错误处理"
msgid "Propagating Errors with ?"
msgstr "使用 ? 传播错误"
-#: src/SUMMARY.md:166 src/error-handling/converting-error-types.md:1
+#: src/SUMMARY.md:166
+#: src/error-handling/converting-error-types.md:1
#: src/error-handling/converting-error-types-example.md:1
msgid "Converting Error Types"
msgstr "转换错误类型"
-#: src/SUMMARY.md:168 src/error-handling/deriving-error-enums.md:1
+#: src/SUMMARY.md:168
+#: src/error-handling/deriving-error-enums.md:1
msgid "Deriving Error Enums"
msgstr "派生错误枚举"
-#: src/SUMMARY.md:169 src/error-handling/dynamic-errors.md:1
+#: src/SUMMARY.md:169
+#: src/error-handling/dynamic-errors.md:1
msgid "Dynamic Error Types"
msgstr "动态错误类型"
-#: src/SUMMARY.md:170 src/error-handling/error-contexts.md:1
+#: src/SUMMARY.md:170
+#: src/error-handling/error-contexts.md:1
msgid "Adding Context to Errors"
msgstr "为错误添加背景信息"
-#: src/SUMMARY.md:171 src/testing.md:1
+#: src/SUMMARY.md:171
+#: src/testing.md:1
msgid "Testing"
msgstr "测试"
-#: src/SUMMARY.md:172 src/testing/unit-tests.md:1
+#: src/SUMMARY.md:172
+#: src/testing/unit-tests.md:1
msgid "Unit Tests"
msgstr "单元测试"
-#: src/SUMMARY.md:173 src/testing/test-modules.md:1
+#: src/SUMMARY.md:173
+#: src/testing/test-modules.md:1
msgid "Test Modules"
msgstr "测试模块"
-#: src/SUMMARY.md:174 src/testing/doc-tests.md:1
+#: src/SUMMARY.md:174
+#: src/testing/doc-tests.md:1
msgid "Documentation Tests"
msgstr "文档测试"
-#: src/SUMMARY.md:175 src/testing/integration-tests.md:1
+#: src/SUMMARY.md:175
+#: src/testing/integration-tests.md:1
msgid "Integration Tests"
msgstr "集成测试"
-#: src/SUMMARY.md:176 src/bare-metal/useful-crates.md:1
+#: src/SUMMARY.md:176
+#: src/bare-metal/useful-crates.md:1
msgid "Useful crates"
msgstr "实用 crate"
-#: src/SUMMARY.md:177 src/unsafe.md:1
+#: src/SUMMARY.md:177
+#: src/unsafe.md:1
msgid "Unsafe Rust"
msgstr "不安全 Rust"
-#: src/SUMMARY.md:178 src/unsafe/raw-pointers.md:1
+#: src/SUMMARY.md:178
+#: src/unsafe/raw-pointers.md:1
msgid "Dereferencing Raw Pointers"
msgstr "解引用裸指针"
-#: src/SUMMARY.md:179 src/unsafe/mutable-static-variables.md:1
+#: src/SUMMARY.md:179
+#: src/unsafe/mutable-static-variables.md:1
msgid "Mutable Static Variables"
msgstr "可变的静态变量"
-#: src/SUMMARY.md:180 src/unsafe/unions.md:1
+#: src/SUMMARY.md:180
+#: src/unsafe/unions.md:1
msgid "Unions"
msgstr "联合体"
-#: src/SUMMARY.md:181 src/unsafe/calling-unsafe-functions.md:1
+#: src/SUMMARY.md:181
+#: src/unsafe/calling-unsafe-functions.md:1
msgid "Calling Unsafe Functions"
msgstr "调用 Unsafe 函数"
-#: src/SUMMARY.md:182 src/unsafe/writing-unsafe-functions.md:1
+#: src/SUMMARY.md:182
+#: src/unsafe/writing-unsafe-functions.md:1
msgid "Writing Unsafe Functions"
msgstr "编写 Unsafe 函数"
@@ -611,24 +729,30 @@ msgstr "编写 Unsafe 函数"
msgid "Extern Functions"
msgstr "外部函数"
-#: src/SUMMARY.md:184 src/unsafe/unsafe-traits.md:1
+#: src/SUMMARY.md:184
+#: src/unsafe/unsafe-traits.md:1
msgid "Implementing Unsafe Traits"
msgstr "实现 Unsafe Trait"
-#: src/SUMMARY.md:186 src/exercises/day-3/safe-ffi-wrapper.md:1
+#: src/SUMMARY.md:186
+#: src/exercises/day-3/safe-ffi-wrapper.md:1
#: src/exercises/day-3/solutions-afternoon.md:3
msgid "Safe FFI Wrapper"
msgstr "安全 FFI 封装容器"
-#: src/SUMMARY.md:189 src/SUMMARY.md:259 src/bare-metal/android.md:1
+#: src/SUMMARY.md:189
+#: src/SUMMARY.md:259
+#: src/bare-metal/android.md:1
msgid "Android"
msgstr "Android"
-#: src/SUMMARY.md:194 src/android/setup.md:1
+#: src/SUMMARY.md:194
+#: src/android/setup.md:1
msgid "Setup"
msgstr "设置"
-#: src/SUMMARY.md:195 src/android/build-rules.md:1
+#: src/SUMMARY.md:195
+#: src/android/build-rules.md:1
msgid "Build Rules"
msgstr "构建规则"
@@ -640,7 +764,8 @@ msgstr "可执行文件"
msgid "Library"
msgstr "库"
-#: src/SUMMARY.md:198 src/android/aidl.md:1
+#: src/SUMMARY.md:198
+#: src/android/aidl.md:1
msgid "AIDL"
msgstr "AIDL"
@@ -656,7 +781,8 @@ msgstr "实现"
msgid "Server"
msgstr "服务器"
-#: src/SUMMARY.md:202 src/android/aidl/deploy.md:1
+#: src/SUMMARY.md:202
+#: src/android/aidl/deploy.md:1
msgid "Deploy"
msgstr "部署"
@@ -664,16 +790,20 @@ msgstr "部署"
msgid "Client"
msgstr "客户端"
-#: src/SUMMARY.md:204 src/android/aidl/changing.md:1
+#: src/SUMMARY.md:204
+#: src/android/aidl/changing.md:1
msgid "Changing API"
msgstr "更改 API"
-#: src/SUMMARY.md:205 src/SUMMARY.md:249 src/android/logging.md:1
+#: src/SUMMARY.md:205
+#: src/SUMMARY.md:249
+#: src/android/logging.md:1
#: src/bare-metal/aps/logging.md:1
msgid "Logging"
msgstr "日志记录"
-#: src/SUMMARY.md:206 src/android/interoperability.md:1
+#: src/SUMMARY.md:206
+#: src/android/interoperability.md:1
msgid "Interoperability"
msgstr "互操作性"
@@ -689,7 +819,8 @@ msgstr "使用Bindgen调用C语言"
msgid "Calling Rust from C"
msgstr "从C语言调用Rust语言"
-#: src/SUMMARY.md:210 src/android/interoperability/cpp.md:1
+#: src/SUMMARY.md:210
+#: src/android/interoperability/cpp.md:1
msgid "With C++"
msgstr "与 C++ 交互"
@@ -713,11 +844,13 @@ msgstr "最小示例"
msgid "alloc"
msgstr "alloc"
-#: src/SUMMARY.md:223 src/bare-metal/microcontrollers.md:1
+#: src/SUMMARY.md:223
+#: src/bare-metal/microcontrollers.md:1
msgid "Microcontrollers"
msgstr "微控制器"
-#: src/SUMMARY.md:224 src/bare-metal/microcontrollers/mmio.md:1
+#: src/SUMMARY.md:224
+#: src/bare-metal/microcontrollers/mmio.md:1
msgid "Raw MMIO"
msgstr "原始 MMIO"
@@ -745,15 +878,18 @@ msgstr "embedded-hal"
msgid "probe-rs, cargo-embed"
msgstr "probe-rs、cargo-embed"
-#: src/SUMMARY.md:231 src/bare-metal/microcontrollers/debugging.md:1
+#: src/SUMMARY.md:231
+#: src/bare-metal/microcontrollers/debugging.md:1
msgid "Debugging"
msgstr "Debugging"
-#: src/SUMMARY.md:232 src/SUMMARY.md:252
+#: src/SUMMARY.md:232
+#: src/SUMMARY.md:252
msgid "Other Projects"
msgstr "其他项目"
-#: src/SUMMARY.md:234 src/exercises/bare-metal/compass.md:1
+#: src/SUMMARY.md:234
+#: src/exercises/bare-metal/compass.md:1
#: src/exercises/bare-metal/solutions-morning.md:3
msgid "Compass"
msgstr "罗盘"
@@ -766,7 +902,8 @@ msgstr "裸机:下午"
msgid "Application Processors"
msgstr "应用处理器"
-#: src/SUMMARY.md:239 src/bare-metal/aps/entry-point.md:1
+#: src/SUMMARY.md:239
+#: src/bare-metal/aps/entry-point.md:1
msgid "Getting Ready to Rust"
msgstr "准备使用 Rust"
@@ -790,7 +927,8 @@ msgstr "更多 trait"
msgid "A Better UART Driver"
msgstr "一个更好的 UART 驱动程序"
-#: src/SUMMARY.md:245 src/bare-metal/aps/better-uart/bitflags.md:1
+#: src/SUMMARY.md:245
+#: src/bare-metal/aps/better-uart/bitflags.md:1
msgid "Bitflags"
msgstr "Bitflags"
@@ -798,15 +936,18 @@ msgstr "Bitflags"
msgid "Multiple Registers"
msgstr "多个寄存器"
-#: src/SUMMARY.md:247 src/bare-metal/aps/better-uart/driver.md:1
+#: src/SUMMARY.md:247
+#: src/bare-metal/aps/better-uart/driver.md:1
msgid "Driver"
msgstr "驱动程序"
-#: src/SUMMARY.md:248 src/SUMMARY.md:250
+#: src/SUMMARY.md:248
+#: src/SUMMARY.md:250
msgid "Using It"
msgstr "开始使用"
-#: src/SUMMARY.md:251 src/bare-metal/aps/exceptions.md:1
+#: src/SUMMARY.md:251
+#: src/bare-metal/aps/exceptions.md:1
#, fuzzy
msgid "Exceptions"
msgstr "函数"
@@ -835,7 +976,8 @@ msgstr "tinyvec"
msgid "spin"
msgstr "转动"
-#: src/SUMMARY.md:260 src/bare-metal/android/vmbase.md:1
+#: src/SUMMARY.md:260
+#: src/bare-metal/android/vmbase.md:1
msgid "vmbase"
msgstr "vmbase"
@@ -847,23 +989,28 @@ msgstr "RTC驱动"
msgid "Concurrency: Morning"
msgstr "并发编程:入门篇"
-#: src/SUMMARY.md:270 src/concurrency/threads.md:1
+#: src/SUMMARY.md:270
+#: src/concurrency/threads.md:1
msgid "Threads"
msgstr "线程"
-#: src/SUMMARY.md:271 src/concurrency/scoped-threads.md:1
+#: src/SUMMARY.md:271
+#: src/concurrency/scoped-threads.md:1
msgid "Scoped Threads"
msgstr "范围线程"
-#: src/SUMMARY.md:272 src/concurrency/channels.md:1
+#: src/SUMMARY.md:272
+#: src/concurrency/channels.md:1
msgid "Channels"
msgstr "通道"
-#: src/SUMMARY.md:273 src/concurrency/channels/unbounded.md:1
+#: src/SUMMARY.md:273
+#: src/concurrency/channels/unbounded.md:1
msgid "Unbounded Channels"
msgstr "无界通道"
-#: src/SUMMARY.md:274 src/concurrency/channels/bounded.md:1
+#: src/SUMMARY.md:274
+#: src/concurrency/channels/bounded.md:1
msgid "Bounded Channels"
msgstr "有界通道"
@@ -879,11 +1026,13 @@ msgstr "Send"
msgid "Sync"
msgstr "Sync"
-#: src/SUMMARY.md:278 src/concurrency/send-sync/examples.md:1
+#: src/SUMMARY.md:278
+#: src/concurrency/send-sync/examples.md:1
msgid "Examples"
msgstr "示例"
-#: src/SUMMARY.md:279 src/concurrency/shared_state.md:1
+#: src/SUMMARY.md:279
+#: src/concurrency/shared_state.md:1
msgid "Shared State"
msgstr "共享状态"
@@ -895,13 +1044,15 @@ msgstr "Arc"
msgid "Mutex"
msgstr "Mutex"
-#: src/SUMMARY.md:284 src/SUMMARY.md:305
+#: src/SUMMARY.md:284
+#: src/SUMMARY.md:305
#: src/exercises/concurrency/dining-philosophers.md:1
#: src/exercises/concurrency/solutions-morning.md:3
msgid "Dining Philosophers"
msgstr "哲学家就餐问题 (Dining philosophers problem)"
-#: src/SUMMARY.md:285 src/exercises/concurrency/link-checker.md:1
+#: src/SUMMARY.md:285
+#: src/exercises/concurrency/link-checker.md:1
msgid "Multi-threaded Link Checker"
msgstr "多线程链接检查器"
@@ -917,32 +1068,40 @@ msgstr "异步基础"
msgid "async/await"
msgstr "async/await"
-#: src/SUMMARY.md:291 src/async/futures.md:1
+#: src/SUMMARY.md:291
+#: src/async/futures.md:1
msgid "Futures"
msgstr "Futures"
-#: src/SUMMARY.md:292 src/async/runtimes.md:1
+#: src/SUMMARY.md:292
+#: src/async/runtimes.md:1
msgid "Runtimes"
msgstr "Runtimes"
-#: src/SUMMARY.md:293 src/async/runtimes/tokio.md:1
+#: src/SUMMARY.md:293
+#: src/async/runtimes/tokio.md:1
msgid "Tokio"
msgstr "Tokio"
-#: src/SUMMARY.md:294 src/exercises/concurrency/link-checker.md:126
-#: src/async/tasks.md:1 src/exercises/concurrency/chat-app.md:143
+#: src/SUMMARY.md:294
+#: src/exercises/concurrency/link-checker.md:126
+#: src/async/tasks.md:1
+#: src/exercises/concurrency/chat-app.md:143
msgid "Tasks"
msgstr "任务"
-#: src/SUMMARY.md:295 src/async/channels.md:1
+#: src/SUMMARY.md:295
+#: src/async/channels.md:1
msgid "Async Channels"
msgstr "异步通道"
-#: src/SUMMARY.md:297 src/async/control-flow/join.md:1
+#: src/SUMMARY.md:297
+#: src/async/control-flow/join.md:1
msgid "Join"
msgstr "加入"
-#: src/SUMMARY.md:298 src/async/control-flow/select.md:1
+#: src/SUMMARY.md:298
+#: src/async/control-flow/select.md:1
msgid "Select"
msgstr "选择"
@@ -954,20 +1113,24 @@ msgstr "误区"
msgid "Blocking the Executor"
msgstr "屏蔽执行器"
-#: src/SUMMARY.md:301 src/async/pitfalls/pin.md:1
+#: src/SUMMARY.md:301
+#: src/async/pitfalls/pin.md:1
msgid "Pin"
msgstr "固定"
-#: src/SUMMARY.md:302 src/async/pitfalls/async-traits.md:1
+#: src/SUMMARY.md:302
+#: src/async/pitfalls/async-traits.md:1
msgid "Async Traits"
msgstr "异步特质"
-#: src/SUMMARY.md:303 src/async/pitfalls/cancellation.md:1
+#: src/SUMMARY.md:303
+#: src/async/pitfalls/cancellation.md:1
#, fuzzy
msgid "Cancellation"
msgstr "安装"
-#: src/SUMMARY.md:306 src/exercises/concurrency/chat-app.md:1
+#: src/SUMMARY.md:306
+#: src/exercises/concurrency/chat-app.md:1
#: src/exercises/concurrency/solutions-afternoon.md:95
msgid "Broadcast Chat Application"
msgstr "广播聊天应用程序"
@@ -976,11 +1139,13 @@ msgstr "广播聊天应用程序"
msgid "Final Words"
msgstr "结束语"
-#: src/SUMMARY.md:313 src/thanks.md:1
+#: src/SUMMARY.md:313
+#: src/thanks.md:1
msgid "Thanks!"
msgstr "谢谢!"
-#: src/SUMMARY.md:314 src/glossary.md:1
+#: src/SUMMARY.md:314
+#: src/glossary.md:1
msgid "Glossary"
msgstr ""
@@ -988,11 +1153,13 @@ msgstr ""
msgid "Other Resources"
msgstr "其他资源"
-#: src/SUMMARY.md:316 src/credits.md:1
+#: src/SUMMARY.md:316
+#: src/credits.md:1
msgid "Credits"
msgstr "鸣谢"
-#: src/SUMMARY.md:319 src/exercises/solutions.md:1
+#: src/SUMMARY.md:319
+#: src/exercises/solutions.md:1
msgid "Solutions"
msgstr "解答"
@@ -1024,7 +1191,8 @@ msgstr "第三天下午"
msgid "Bare Metal Rust Morning"
msgstr "嵌入式 Rust:入门篇"
-#: src/SUMMARY.md:331 src/exercises/bare-metal/solutions-afternoon.md:1
+#: src/SUMMARY.md:331
+#: src/exercises/bare-metal/solutions-afternoon.md:1
msgid "Bare Metal Rust Afternoon"
msgstr "嵌入式 Rust:进阶篇"
@@ -1039,39 +1207,32 @@ msgstr "并发编程:进阶篇"
#: src/index.md:3
#, fuzzy
msgid ""
-"[](https://github.com/"
-"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!"
-"[GitHub contributors](https://img.shields.io/github/contributors/google/"
-"comprehensive-rust?style=flat-square)](https://github.com/google/"
-"comprehensive-rust/graphs/contributors) [](https://github."
-"com/google/comprehensive-rust/stargazers)"
+"[](https://github.com/google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) "
+"[](https://github.com/google/comprehensive-rust/graphs/contributors) "
+"[](https://github.com/google/comprehensive-rust/stargazers)"
msgstr ""
-"[](https://github.com/google/"
-"comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!"
-"[GitHub 贡献者](https://img.shields.io/github/contributors/google/"
-"comprehensive-rust?style=flat-square)](https://github.com/google/"
-"comprehensive-rust/graphs/contributors)"
+"[](https://github.com/google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) "
+"[](https://github.com/google/comprehensive-rust/graphs/contributors)"
#: src/index.md:7
msgid ""
"This is a free Rust course developed by the Android team at Google. The "
"course covers the full spectrum of Rust, from basic syntax to advanced "
"topics like generics and error handling."
-msgstr ""
-"这是由 Android 团队开发的免费 Rust 课程。该课程涵盖了 Rust 的全部范围,从基本"
-"语法到高级主题如泛型和错误处理。"
+msgstr "这是由 Android 团队开发的免费 Rust 课程。该课程涵盖了 Rust 的全部范围,从基本语法到高级主题如泛型和错误处理。"
#: src/index.md:11
msgid ""
-"The latest version of the course can be found at . If you are reading somewhere else, please check there "
-"for updates."
+"The latest version of the course can be found at "
+". If you are reading somewhere "
+"else, please check there for updates."
msgstr ""
-"如需查看课程的最新版本,请访问 。如果您是在其他地方阅读,请查看这个网址了解是否有更新。"
+"如需查看课程的最新版本,请访问 "
+"。如果您是在其他地方阅读,请查看这个网址了解是否有更新。"
#: src/index.md:15
msgid ""
@@ -1105,8 +1266,8 @@ msgid ""
"[Android](android.md): a half-day course on using Rust for Android platform "
"development (AOSP). This includes interoperability with C, C++, and Java."
msgstr ""
-"[Android](android.md):一个半天的课程,介绍如何在 Android 平台开发中使用 Rust"
-"(AOSP)。课程内容包括与 C、C++ 和 Java 的互操作性。"
+"[Android](android.md):一个半天的课程,介绍如何在 Android 平台开发中使用 Rust(AOSP)。课程内容包括与 C、C++ "
+"和 Java 的互操作性。"
#: src/index.md:28
msgid ""
@@ -1114,8 +1275,7 @@ msgid ""
"(embedded) development. Both microcontrollers and application processors are "
"covered."
msgstr ""
-"[Bare-metal](bare-metal.md):为期一天的课程,介绍如何使用 Rust 进行裸机(嵌入式)"
-"开发。课程内容涵盖微控制器和应用处理器。"
+"[Bare-metal](bare-metal.md):为期一天的课程,介绍如何使用 Rust 进行裸机(嵌入式)开发。课程内容涵盖微控制器和应用处理器。"
#: src/index.md:31
#, fuzzy
@@ -1125,9 +1285,8 @@ msgid ""
"mutexes) and async/await concurrency (cooperative multitasking using "
"futures)."
msgstr ""
-"[并发](concurrency.md):一天的课程,介绍 Rust 中的并发性。我们将涵盖传统并发(使"
-"用线程和互斥锁进行抢占式调度)和 async/await 并发(使用 futures 进行协作式多任"
-"务处理)。"
+"[并发](concurrency.md):一天的课程,介绍 Rust 中的并发性。我们将涵盖传统并发(使用线程和互斥锁进行抢占式调度)和 "
+"async/await 并发(使用 futures 进行协作式多任务处理)。"
#: src/index.md:37
msgid "Non-Goals"
@@ -1137,19 +1296,18 @@ msgstr "非目标"
msgid ""
"Rust is a large language and we won't be able to cover all of it in a few "
"days. Some non-goals of this course are:"
-msgstr ""
-"Rust 是一门庞大的语言,我们无法在几天内涵盖所有内容。本课程的一些非目标包括:"
+msgstr "Rust 是一门庞大的语言,我们无法在几天内涵盖所有内容。本课程的一些非目标包括:"
#: src/index.md:42
#, fuzzy
msgid ""
-"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]"
-"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]"
-"(https://doc.rust-lang.org/rust-by-example/macros.html) instead."
+"Learning how to develop macros: please see [Chapter 19.5 in the Rust "
+"Book](https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by "
+"Example](https://doc.rust-lang.org/rust-by-example/macros.html) instead."
msgstr ""
-"了解如何开发宏,请参阅[本书中的第 19.5 章](https://doc.rust-lang.org/book/"
-"ch19-06-macros.html)和 [Rust by Examples](https://doc.rust-lang.org/rust-by-"
-"example/macros.html)。"
+"了解如何开发宏,请参阅[本书中的第 19.5 "
+"章](https://doc.rust-lang.org/book/ch19-06-macros.html)和 [Rust by "
+"Examples](https://doc.rust-lang.org/rust-by-example/macros.html)。"
#: src/index.md:46
msgid "Assumptions"
@@ -1161,18 +1319,14 @@ msgid ""
"The course assumes that you already know how to program. Rust is a "
"statically-typed language and we will sometimes make comparisons with C and "
"C++ to better explain or contrast the Rust approach."
-msgstr ""
-"本课程假设你已经具备编程知识。Rust 是一种静态类型语言,我们有时会与 C 和 C++ "
-"进行比较,以更好地解释或对比 Rust 的方法。"
+msgstr "本课程假设你已经具备编程知识。Rust 是一种静态类型语言,我们有时会与 C 和 C++ 进行比较,以更好地解释或对比 Rust 的方法。"
#: src/index.md:52
#, fuzzy
msgid ""
"If you know how to program in a dynamically-typed language such as Python or "
"JavaScript, then you will be able to follow along just fine too."
-msgstr ""
-"如果你已经了解如 Python 或 JavaScript 等动态类型语言的编程,那么你也能够很好地"
-"跟上本课程。"
+msgstr "如果你已经了解如 Python 或 JavaScript 等动态类型语言的编程,那么你也能够很好地跟上本课程。"
#: src/index.md:57
#, fuzzy
@@ -1180,11 +1334,10 @@ msgid ""
"This is an example of a _speaker note_. We will use these to add additional "
"information to the slides. This could be key points which the instructor "
"should cover as well as answers to typical questions which come up in class."
-msgstr ""
-"这是演讲者备注的示例。我们将使用这些备注来为幻灯片添加额外的信息。这可能包括"
-"讲师应该涵盖的关键点,以及课堂上常见问题的答案。"
+msgstr "这是演讲者备注的示例。我们将使用这些备注来为幻灯片添加额外的信息。这可能包括讲师应该涵盖的关键点,以及课堂上常见问题的答案。"
-#: src/running-the-course.md:3 src/running-the-course/course-structure.md:3
+#: src/running-the-course.md:3
+#: src/running-the-course/course-structure.md:3
msgid "This page is for the course instructor."
msgstr "本页面适用于课程教师。"
@@ -1203,10 +1356,9 @@ msgid ""
"The downside of longer session is that people can become very tired after 6 "
"full hours of class in the afternoon."
msgstr ""
-"上课时间通常是从上午 10:00 到下午 4:00,中间有 1 小时的午餐休息时间。这样,上午"
-"和下午各留了 2.5 小时的上课时间。请注意,这仅是建议:您也可以上午上课 3 小时,让"
-"学员有更多的时间进行练习。上课时间较长的缺点是,学员上了整整 6 小时的课,到了下"
-"午可能会非常疲倦。"
+"上课时间通常是从上午 10:00 到下午 4:00,中间有 1 小时的午餐休息时间。这样,上午和下午各留了 2.5 "
+"小时的上课时间。请注意,这仅是建议:您也可以上午上课 3 小时,让学员有更多的时间进行练习。上课时间较长的缺点是,学员上了整整 6 "
+"小时的课,到了下午可能会非常疲倦。"
#: src/running-the-course.md:16
msgid "Before you run the course, you will want to:"
@@ -1220,10 +1372,7 @@ msgid ""
"notes in a popup (click the link with a little arrow next to \"Speaker "
"Notes\"). This way you have a clean screen to present to the class."
msgstr ""
-"熟悉课程资料。我们添加了演讲者备注,借此强调要点(请帮个忙,多多贡献演讲者备"
-"注!)。演示幻灯片时,你应确保在弹出式窗口中打开演讲者备注(点击对应的链接,"
-"在“演讲者备注”旁边有一个小箭头)。这样,你就可以确保屏幕整洁有序,更好地向全"
-"班学员展示课程内容。"
+"熟悉课程资料。我们添加了演讲者备注,借此强调要点(请帮个忙,多多贡献演讲者备注!)。演示幻灯片时,你应确保在弹出式窗口中打开演讲者备注(点击对应的链接,在“演讲者备注”旁边有一个小箭头)。这样,你就可以确保屏幕整洁有序,更好地向全班学员展示课程内容。"
#: src/running-the-course.md:24
msgid ""
@@ -1232,9 +1381,7 @@ msgid ""
"have said that they find it helpful to have a gap in the course since it "
"helps them process all the information we give them."
msgstr ""
-"确定培训日期。由于本课程至少需要三天的时间,因此我们建议你安排两周以上的时"
-"间。课程学员曾表示,在每堂课之间留一段间隔会很有帮助,因为这有利于他们吸收我"
-"们所提供的所有信息。"
+"确定培训日期。由于本课程至少需要三天的时间,因此我们建议你安排两周以上的时间。课程学员曾表示,在每堂课之间留一段间隔会很有帮助,因为这有利于他们吸收我们所提供的所有信息。"
#: src/running-the-course.md:29
msgid ""
@@ -1246,24 +1393,21 @@ msgid ""
"laptops. In particular, you will be doing a lot of live-coding as an "
"instructor, so a lectern won't be very helpful for you."
msgstr ""
-"找一间足以容纳全体线下学员的大教室。我们建议你将课程人数控制在 15-25 人之间。"
-"这样,人数足够少,不仅便于学员提问问题,配备的一位教师也有时间答疑解惑。确保"
-"教室备有供你和学生使用的“课桌”:你们都需要能够坐下来并操作各自的笔记本电脑。"
-"特别是身为教师,你现场要进行大量编码,所以讲台对你来说用处不大。"
+"找一间足以容纳全体线下学员的大教室。我们建议你将课程人数控制在 15-25 "
+"人之间。这样,人数足够少,不仅便于学员提问问题,配备的一位教师也有时间答疑解惑。确保教室备有供你和学生使用的“课桌”:你们都需要能够坐下来并操作各自的笔记本电脑。特别是身为教师,你现场要进行大量编码,所以讲台对你来说用处不大。"
#: src/running-the-course.md:37
msgid ""
"On the day of your course, show up to the room a little early to set things "
"up. We recommend presenting directly using `mdbook serve` running on your "
-"laptop (see the [installation instructions](https://github.com/google/"
-"comprehensive-rust#building)). This ensures optimal performance with no lag "
-"as you change pages. Using your laptop will also allow you to fix typos as "
-"you or the course participants spot them."
+"laptop (see the [installation "
+"instructions](https://github.com/google/comprehensive-rust#building)). This "
+"ensures optimal performance with no lag as you change pages. Using your "
+"laptop will also allow you to fix typos as you or the course participants "
+"spot them."
msgstr ""
-"在开课当天,请提前一点到教室,设置好教学设备。我们建议你直接在笔记本电脑上运"
-"行 `mdbook serve` 来演示课程内容(请参阅[安装说明](https://github.com/google/"
-"comprehensive-rust#building))。这样可以确保你在切换页面时没有延迟,演示效果"
-"更好。当你或课程学员发现拼写错误时,你也可以使用笔记本电脑及时更正。"
+"在开课当天,请提前一点到教室,设置好教学设备。我们建议你直接在笔记本电脑上运行 `mdbook serve` "
+"来演示课程内容(请参阅[安装说明](https://github.com/google/comprehensive-rust#building))。这样可以确保你在切换页面时没有延迟,演示效果更好。当你或课程学员发现拼写错误时,你也可以使用笔记本电脑及时更正。"
#: src/running-the-course.md:43
msgid ""
@@ -1275,10 +1419,8 @@ msgid ""
"offer a solution, e.g., by showing people where to find the relevant "
"information in the standard library."
msgstr ""
-"让学员采取小组形式或独立解题。通常,我们会在上午和下午各安排 30-45 分钟的练习"
-"时间(包括查看解决方案的时间)。请务必询问学员是否遇到困难,或是否需要任何帮"
-"助。如果你看到多位学员遇到同样的问题,请在班级集体进行讲解,并提供相应的解决"
-"方案,例如告诉大家在标准库的什么位置可以找到相关信息。"
+"让学员采取小组形式或独立解题。通常,我们会在上午和下午各安排 30-45 "
+"分钟的练习时间(包括查看解决方案的时间)。请务必询问学员是否遇到困难,或是否需要任何帮助。如果你看到多位学员遇到同样的问题,请在班级集体进行讲解,并提供相应的解决方案,例如告诉大家在标准库的什么位置可以找到相关信息。"
#: src/running-the-course.md:51
msgid ""
@@ -1288,18 +1430,16 @@ msgstr "今天的分享就是这些,祝你授课顺利!希望你和我们一
#: src/running-the-course.md:54
msgid ""
-"Please [provide feedback](https://github.com/google/comprehensive-rust/"
-"discussions/86) afterwards so that we can keep improving the course. We "
-"would love to hear what worked well for you and what can be made better. "
-"Your students are also very welcome to [send us feedback](https://github.com/"
-"google/comprehensive-rust/discussions/100)!"
+"Please [provide "
+"feedback](https://github.com/google/comprehensive-rust/discussions/86) "
+"afterwards so that we can keep improving the course. We would love to hear "
+"what worked well for you and what can be made better. Your students are also "
+"very welcome to [send us "
+"feedback](https://github.com/google/comprehensive-rust/discussions/100)!"
msgstr ""
-"欢迎你课后[提供反馈](https://github.com/google/comprehensive-rust/"
-"discussions/86),帮助我们不断改进课程。我们非常期待了解哪些方面做得不错,哪些"
-"方面还需要改进。同时非常欢迎学生们[向我们发送反馈](https://github.com/google/"
-"comprehensive-rust/discussions/100)!"
+"欢迎你课后[提供反馈](https://github.com/google/comprehensive-rust/discussions/86),帮助我们不断改进课程。我们非常期待了解哪些方面做得不错,哪些方面还需要改进。同时非常欢迎学生们[向我们发送反馈](https://github.com/google/comprehensive-rust/discussions/100)!"
-#: src/running-the-course/course-structure.md:5 src/glossary.md:58
+#: src/running-the-course/course-structure.md:5
msgid "Rust Fundamentals"
msgstr "Rust 二进制文件"
@@ -1307,9 +1447,7 @@ msgstr "Rust 二进制文件"
msgid ""
"The first three days make up [Rust Fundaments](../welcome-day-1.md). The "
"days are fast paced and we cover a lot of ground:"
-msgstr ""
-"我们会在头三天介绍 [Rust 基础知识](../welcome-day-1.md)。这几天的步调会稍快,"
-"因为我们要探讨许多层面:"
+msgstr "我们会在头三天介绍 [Rust 基础知识](../welcome-day-1.md)。这几天的步调会稍快,因为我们要探讨许多层面:"
#: src/running-the-course/course-structure.md:10
msgid "Day 1: Basic Rust, syntax, control flow, creating and consuming values."
@@ -1337,7 +1475,7 @@ msgid ""
"specialized topics:"
msgstr "除了为期 3 天的“Rust 基础知识”课程外,我们还推出了一些专题课程:"
-#: src/running-the-course/course-structure.md:19 src/glossary.md:59
+#: src/running-the-course/course-structure.md:19
#, fuzzy
msgid "Rust in Android"
msgstr "欢迎来到Android 中的Rust"
@@ -1349,21 +1487,23 @@ msgid ""
"Rust for Android platform development. This includes interoperability with "
"C, C++, and Java."
msgstr ""
-"`[深入探究 Android](../android.md)`课程为期半天,旨在介绍如何使用 Rust 进行 "
-"Android 平台开发。其中包括与 C、C++ 和 Java 的互操作性。"
+"`[深入探究 Android](../android.md)`课程为期半天,旨在介绍如何使用 Rust 进行 Android 平台开发。其中包括与 "
+"C、C++ 和 Java 的互操作性。"
#: src/running-the-course/course-structure.md:25
msgid ""
-"You will need an [AOSP checkout](https://source.android.com/docs/setup/"
-"download/downloading). Make a checkout of the [course repository](https://"
-"github.com/google/comprehensive-rust) on the same machine and move the `src/"
-"android/` directory into the root of your AOSP checkout. This will ensure "
-"that the Android build system sees the `Android.bp` files in `src/android/`."
+"You will need an [AOSP "
+"checkout](https://source.android.com/docs/setup/download/downloading). Make "
+"a checkout of the [course "
+"repository](https://github.com/google/comprehensive-rust) on the same "
+"machine and move the `src/android/` directory into the root of your AOSP "
+"checkout. This will ensure that the Android build system sees the "
+"`Android.bp` files in `src/android/`."
msgstr ""
-"你将需要[签出 AOSP](https://source.android.com/docs/setup/download/"
-"downloading)。在同一机器上签出[课程库](https://github.com/google/"
-"comprehensive-rust), 然后将 `src/android/` 目录移至所签出的 AOSP 的根目录。"
-"这将确保 Android 构建系统能检测到 `src/android/` 中的 `Android.bp` 文件。"
+"你将需要[签出 "
+"AOSP](https://source.android.com/docs/setup/download/downloading)。在同一机器上签出[课程库](https://github.com/google/comprehensive-rust), "
+"然后将 `src/android/` 目录移至所签出的 AOSP 的根目录。这将确保 Android 构建系统能检测到 `src/android/` "
+"中的 `Android.bp` 文件。"
#: src/running-the-course/course-structure.md:30
msgid ""
@@ -1371,9 +1511,8 @@ msgid ""
"all Android examples using `src/android/build_all.sh`. Read the script to "
"see the commands it runs and make sure they work when you run them by hand."
msgstr ""
-"确保 `adb sync` 适用于你的模拟器或实际设备, 并使用 `src/android/build_all."
-"sh` 预构建所有 Android 示例。请阅读脚本, 查看它所运行的命令,并确保这些命令"
-"能在你手动运行时正确执行。"
+"确保 `adb sync` 适用于你的模拟器或实际设备, 并使用 `src/android/build_all.sh` 预构建所有 Android "
+"示例。请阅读脚本, 查看它所运行的命令,并确保这些命令能在你手动运行时正确执行。"
#: src/running-the-course/course-structure.md:37
#, fuzzy
@@ -1387,21 +1526,20 @@ msgid ""
"using Rust for bare-metal (embedded) development. Both microcontrollers and "
"application processors are covered."
msgstr ""
-"`[深入探究裸机](../bare-metal.md)`课程为期一天,旨在介绍如何使用 Rust 进行裸机"
-"(嵌入式)开发。其中涵盖了微控制器和应用 处理器。"
+"`[深入探究裸机](../bare-metal.md)`课程为期一天,旨在介绍如何使用 Rust 进行裸机(嵌入式)开发。其中涵盖了微控制器和应用 "
+"处理器。"
#: src/running-the-course/course-structure.md:43
msgid ""
-"For the microcontroller part, you will need to buy the [BBC micro:bit]"
-"(https://microbit.org/) v2 development board ahead of time. Everybody will "
-"need to install a number of packages as described on the [welcome page](../"
-"bare-metal.md)."
+"For the microcontroller part, you will need to buy the [BBC "
+"micro:bit](https://microbit.org/) v2 development board ahead of time. "
+"Everybody will need to install a number of packages as described on the "
+"[welcome page](../bare-metal.md)."
msgstr ""
"对于微控制器部分,你需要提前购买 [BBC micro:bit](https://microbit.org/) 第 2 "
-"版开发板。每个人都需要安装多个软件包, 具体如[欢迎页面](../bare-metal.md)中所"
-"述。"
+"版开发板。每个人都需要安装多个软件包, 具体如[欢迎页面](../bare-metal.md)中所述。"
-#: src/running-the-course/course-structure.md:48 src/glossary.md:24
+#: src/running-the-course/course-structure.md:48
msgid "Concurrency in Rust"
msgstr "欢迎了解 Rust 中的并发"
@@ -1409,9 +1547,7 @@ msgstr "欢迎了解 Rust 中的并发"
msgid ""
"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class "
"on classical as well as `async`/`await` concurrency."
-msgstr ""
-"`[深入探究并发](../concurrency.md)`课程为期一天,旨在介绍传统并发和 `async`/"
-"`await` 并发。"
+msgstr "`[深入探究并发](../concurrency.md)`课程为期一天,旨在介绍传统并发和 `async`/`await` 并发。"
#: src/running-the-course/course-structure.md:53
msgid ""
@@ -1419,8 +1555,7 @@ msgid ""
"to go. You can then copy/paste the examples into `src/main.rs` to experiment "
"with them:"
msgstr ""
-"你需要设置一个新 crate,下载所需的依赖项, 做好课前准备。然后,你可以将示例复"
-"制/粘贴到 `src/main.rs` 中, 以便对以下代码进行实验:"
+"你需要设置一个新 crate,下载所需的依赖项, 做好课前准备。然后,你可以将示例复制/粘贴到 `src/main.rs` 中, 以便对以下代码进行实验:"
#: src/running-the-course/course-structure.md:64
msgid "Format"
@@ -1452,7 +1587,8 @@ msgstr "向右箭头"
msgid ": Navigate to the next page."
msgstr ":转到下一页。"
-#: src/running-the-course/keyboard-shortcuts.md:7 src/cargo/code-samples.md:19
+#: src/running-the-course/keyboard-shortcuts.md:7
+#: src/cargo/code-samples.md:19
msgid "Ctrl + Enter"
msgstr "Ctrl + Enter"
@@ -1477,29 +1613,28 @@ msgstr "一批优秀的志愿者已将本课程翻译成其他语言:"
#: src/running-the-course/translations.md:6
msgid ""
"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) "
-"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github."
-"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and "
+"by [@rastringer](https://github.com/rastringer), "
+"[@hugojacob](https://github.com/hugojacob), "
+"[@joaovicmendes](https://github.com/joaovicmendes), and "
"[@henrif75](https://github.com/henrif75)."
msgstr ""
-"[巴西葡萄牙语版本](https://google.github.io/comprehensive-rust/pt-BR/)译者:"
-"[@rastringer](https://github.com/rastringer)、[@hugojacob](https://github."
-"com/hugojacob)、[@joaovicmendes](https://github.com/joaovicmendes) 和 "
-"[@henrif75](https://github.com/henrif75)。"
+"[巴西葡萄牙语版本](https://google.github.io/comprehensive-rust/pt-BR/)译者:[@rastringer](https://github.com/rastringer)、[@hugojacob](https://github.com/hugojacob)、[@joaovicmendes](https://github.com/joaovicmendes) "
+"和 [@henrif75](https://github.com/henrif75)。"
#: src/running-the-course/translations.md:7
msgid ""
-"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]"
-"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and "
+"[Korean](https://google.github.io/comprehensive-rust/ko/) by "
+"[@keispace](https://github.com/keispace), "
+"[@jiyongp](https://github.com/jiyongp), and "
"[@jooyunghan](https://github.com/jooyunghan)."
msgstr ""
-"[韩语版本](https://google.github.io/comprehensive-rust/ko/)译者:[@keispace]"
-"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp) 和 "
-"[@jooyunghan](https://github.com/jooyunghan)。"
+"[韩语版本](https://google.github.io/comprehensive-rust/ko/)译者:[@keispace](https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp) "
+"和 [@jooyunghan](https://github.com/jooyunghan)。"
#: src/running-the-course/translations.md:8
msgid ""
-"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]"
-"(https://github.com/deavid)."
+"[Spanish](https://google.github.io/comprehensive-rust/es/) by "
+"[@deavid](https://github.com/deavid)."
msgstr ""
#: src/running-the-course/translations.md:10
@@ -1519,78 +1654,76 @@ msgstr "多数语言版本仍在翻译中。我们会提供最近更新的翻译
#: src/running-the-course/translations.md:17
msgid ""
-"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]"
-"(https://github.com/raselmandol)."
+"[Bengali](https://google.github.io/comprehensive-rust/bn/) by "
+"[@raselmandol](https://github.com/raselmandol)."
msgstr ""
-"[孟加拉语版本](https://google.github.io/comprehensive-rust/bn/)译者:"
-"[@raselmandol](https://github.com/raselmandol)。"
+"[孟加拉语版本](https://google.github.io/comprehensive-rust/bn/)译者:[@raselmandol](https://github.com/raselmandol)。"
#: src/running-the-course/translations.md:18
msgid ""
"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) "
-"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/"
-"victorhsieh), [@mingyc](https://github.com/mingyc), and [@johnathan79717]"
-"(https://github.com/johnathan79717)."
+"by [@hueich](https://github.com/hueich), "
+"[@victorhsieh](https://github.com/victorhsieh), "
+"[@mingyc](https://github.com/mingyc), and "
+"[@johnathan79717](https://github.com/johnathan79717)."
msgstr ""
#: src/running-the-course/translations.md:19
msgid ""
"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) "
-"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/"
-"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/"
-"kongy), [@noahdragon](https://github.com/noahdragon), and [@superwhd]"
-"(https://github.com/superwhd)."
+"by [@suetfei](https://github.com/suetfei), "
+"[@wnghl](https://github.com/wnghl), [@anlunx](https://github.com/anlunx), "
+"[@kongy](https://github.com/kongy), "
+"[@noahdragon](https://github.com/noahdragon), and "
+"[@superwhd](https://github.com/superwhd)."
msgstr ""
#: src/running-the-course/translations.md:20
msgid ""
-"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]"
-"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)."
+"[French](https://google.github.io/comprehensive-rust/fr/) by "
+"[@KookaS](https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)."
msgstr ""
-"[法语版本](https://google.github.io/comprehensive-rust/fr/)译者:[@KookaS]"
-"(https://github.com/KookaS) 和 [@vcaen](https://github.com/vcaen)。"
+"[法语版本](https://google.github.io/comprehensive-rust/fr/)译者:[@KookaS](https://github.com/KookaS) "
+"和 [@vcaen](https://github.com/vcaen)。"
#: src/running-the-course/translations.md:21
msgid ""
-"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]"
-"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)."
+"[German](https://google.github.io/comprehensive-rust/de/) by "
+"[@Throvn](https://github.com/Throvn) and "
+"[@ronaldfw](https://github.com/ronaldfw)."
msgstr ""
-"[德语版本](https://google.github.io/comprehensive-rust/de/)译者:[@Throvn]"
-"(https://github.com/Throvn) 和 [@ronaldfw](https://github.com/ronaldfw)。"
+"[德语版本](https://google.github.io/comprehensive-rust/de/)译者:[@Throvn](https://github.com/Throvn) "
+"和 [@ronaldfw](https://github.com/ronaldfw)。"
#: src/running-the-course/translations.md:22
msgid ""
-"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]"
-"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/"
-"momotaro1105)."
+"[Japanese](https://google.github.io/comprehensive-rust/ja/) by "
+"[@CoinEZ-JPN](https://github.com/CoinEZ) and "
+"[@momotaro1105](https://github.com/momotaro1105)."
msgstr ""
-"[日语版本](https://google.github.io/comprehensive-rust/ja/)译者:[@CoinEZ-JPN]"
-"(https://github.com/CoinEZ) 和 [@momotaro1105](https://github.com/"
-"momotaro1105)。"
+"[日语版本](https://google.github.io/comprehensive-rust/ja/)译者:[@CoinEZ-JPN](https://github.com/CoinEZ) "
+"和 [@momotaro1105](https://github.com/momotaro1105)。"
#: src/running-the-course/translations.md:24
msgid ""
-"If you want to help with this effort, please see [our instructions](https://"
-"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to "
-"get going. Translations are coordinated on the [issue tracker](https://"
-"github.com/google/comprehensive-rust/issues/282)."
+"If you want to help with this effort, please see [our "
+"instructions](https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) "
+"for how to get going. Translations are coordinated on the [issue "
+"tracker](https://github.com/google/comprehensive-rust/issues/282)."
msgstr ""
-"如果你想帮助我们,请参阅[我们的说明](htts://github.com/google/comprehensive-"
-"rust/blob/main/TRANSLATIONS.md),了解如何开始翻译。翻译工作将通过[问题跟踪器]"
-"(https://github.com/google/comprehensive-rust/issues/282)."
+"如果你想帮助我们,请参阅[我们的说明](htts://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md),了解如何开始翻译。翻译工作将通过[问题跟踪器](https://github.com/google/comprehensive-rust/issues/282)."
#: src/cargo.md:3
msgid ""
-"When you start reading about Rust, you will soon meet [Cargo](https://doc."
-"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build "
-"and run Rust applications. Here we want to give a brief overview of what "
-"Cargo is and how it fits into the wider ecosystem and how it fits into this "
-"training."
+"When you start reading about Rust, you will soon meet "
+"[Cargo](https://doc.rust-lang.org/cargo/), the standard tool used in the "
+"Rust ecosystem to build and run Rust applications. Here we want to give a "
+"brief overview of what Cargo is and how it fits into the wider ecosystem and "
+"how it fits into this training."
msgstr ""
-"开始了解 Rust 后,你很快就会遇到 [Cargo](https://doc.rust-lang.org/cargo/),"
-"这是 Rust 生态系统中 用于构建和运行 Rust 应用的标准工具。在这里,我们希望 简"
-"要介绍一下什么是 Cargo,它如何融入更广泛的生态系统, 以及我们如何在本培训中合"
-"理利用 Cargo。"
+"开始了解 Rust 后,你很快就会遇到 [Cargo](https://doc.rust-lang.org/cargo/),这是 Rust 生态系统中 "
+"用于构建和运行 Rust 应用的标准工具。在这里,我们希望 简要介绍一下什么是 Cargo,它如何融入更广泛的生态系统, 以及我们如何在本培训中合理利用 "
+"Cargo。"
#: src/cargo.md:8
msgid "Installation"
@@ -1612,12 +1745,14 @@ msgstr ""
#: src/cargo.md:14
msgid ""
"After installing Rust, you should configure your editor or IDE to work with "
-"Rust. Most editors do this by talking to [rust-analyzer](https://rust-"
-"analyzer.github.io/), which provides auto-completion and jump-to-definition "
-"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://"
-"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-"
-"analyzer.github.io/manual.html#vimneovim), and many others. There is also a "
-"different IDE available called [RustRover](https://www.jetbrains.com/rust/)."
+"Rust. Most editors do this by talking to "
+"[rust-analyzer](https://rust-analyzer.github.io/), which provides "
+"auto-completion and jump-to-definition functionality for [VS "
+"Code](https://code.visualstudio.com/), "
+"[Emacs](https://rust-analyzer.github.io/manual.html#emacs), "
+"[Vim/Neovim](https://rust-analyzer.github.io/manual.html#vimneovim), and "
+"many others. There is also a different IDE available called "
+"[RustRover](https://www.jetbrains.com/rust/)."
msgstr ""
#: src/cargo.md:18
@@ -1627,9 +1762,9 @@ msgid ""
"gets you an outdated rust version and may lead to unexpected behavior. The "
"command would be:"
msgstr ""
-"在 Debian/Ubuntu 上,你也可以通过 `apt` 安装 Cargo、Rust 源代码和 [Rust 格式设"
-"置工具](https://github.com/rust-lang/rustfmt)。但是,这样会得到一个过时的 "
-"Rust 版本,可能会导致意外的行为。命令如下:"
+"在 Debian/Ubuntu 上,你也可以通过 `apt` 安装 Cargo、Rust 源代码和 [Rust "
+"格式设置工具](https://github.com/rust-lang/rustfmt)。但是,这样会得到一个过时的 Rust "
+"版本,可能会导致意外的行为。命令如下:"
#: src/cargo/rust-ecosystem.md:1
msgid "The Rust Ecosystem"
@@ -1653,9 +1788,8 @@ msgid ""
"pass them to `rustc` when building your project. Cargo also comes with a "
"built-in test runner which is used to execute unit tests."
msgstr ""
-"`cargo`:Rust 依赖项管理器和构建工具。Cargo 知道如何 下载托管在 上的依赖项,并在构建项目时将它们 传递给 `rustc`。Cargo 还附带一个内"
-"置的 测试运行程序,用于执行单元测试。"
+"`cargo`:Rust 依赖项管理器和构建工具。Cargo 知道如何 下载托管在 "
+"上的依赖项,并在构建项目时将它们 传递给 `rustc`。Cargo 还附带一个内置的 测试运行程序,用于执行单元测试。"
#: src/cargo/rust-ecosystem.md:13
msgid ""
@@ -1665,19 +1799,22 @@ msgid ""
"standard library. You can have multiple versions of Rust installed at once "
"and `rustup` will let you switch between them as needed."
msgstr ""
-"`rustup`:Rust 工具链安装程序和更新程序。发布新版本 Rust 时,此工具用于 安装"
-"并更新 `rustc` 和 `cargo`。 此外,`rustup` 还可以下载标准 库的文档。你可以同"
-"时安装多个版本的 Rust,并且 `rustup` 可让你根据需要在这些版本之间切换。"
+"`rustup`:Rust 工具链安装程序和更新程序。发布新版本 Rust 时,此工具用于 安装并更新 `rustc` 和 `cargo`。 "
+"此外,`rustup` 还可以下载标准 库的文档。你可以同时安装多个版本的 Rust,并且 `rustup` 可让你根据需要在这些版本之间切换。"
-#: src/cargo/rust-ecosystem.md:21 src/hello-world.md:25
-#: src/hello-world/small-example.md:27 src/why-rust/runtime.md:10
-#: src/why-rust/modern.md:21 src/basic-syntax/compound-types.md:32
+#: src/cargo/rust-ecosystem.md:21
+#: src/hello-world.md:25
+#: src/hello-world/small-example.md:27
+#: src/why-rust/runtime.md:10
+#: src/why-rust/modern.md:21
+#: src/basic-syntax/compound-types.md:32
#: src/basic-syntax/references.md:24
#: src/pattern-matching/destructuring-enums.md:35
#: src/ownership/double-free-modern-cpp.md:55
#: src/error-handling/try-operator.md:48
#: src/error-handling/converting-error-types-example.md:50
-#: src/concurrency/threads.md:30 src/async/async-await.md:25
+#: src/concurrency/threads.md:30
+#: src/async/async-await.md:25
msgid "Key points:"
msgstr "关键点:"
@@ -1686,13 +1823,10 @@ msgid ""
"Rust has a rapid release schedule with a new release coming out every six "
"weeks. New releases maintain backwards compatibility with old releases --- "
"plus they enable new functionality."
-msgstr ""
-"Rust 有一个快速发布时间表,每六周就会发布一次 新版本。新版本保持与 旧版本的向"
-"后兼容性,还添加了新功能。"
+msgstr "Rust 有一个快速发布时间表,每六周就会发布一次 新版本。新版本保持与 旧版本的向后兼容性,还添加了新功能。"
#: src/cargo/rust-ecosystem.md:27
-msgid ""
-"There are three release channels: \"stable\", \"beta\", and \"nightly\"."
+msgid "There are three release channels: \"stable\", \"beta\", and \"nightly\"."
msgstr "共有三个发布阶段:“稳定版”“Beta 版”和“夜间版”。"
#: src/cargo/rust-ecosystem.md:29
@@ -1703,19 +1837,17 @@ msgstr "我们会在“夜间版”上测试新功能,每六周将“Beta 版
#: src/cargo/rust-ecosystem.md:32
msgid ""
-"Dependencies can also be resolved from alternative [registries](https://doc."
-"rust-lang.org/cargo/reference/registries.html), git, folders, and more."
+"Dependencies can also be resolved from alternative "
+"[registries](https://doc.rust-lang.org/cargo/reference/registries.html), "
+"git, folders, and more."
msgstr ""
-"您也可以通过备用的[注册数据库](https://doc.rust-lang.org/cargo/reference/"
-"registries.html)、git、文件夹等资源来解析依赖项。"
+"您也可以通过备用的[注册数据库](https://doc.rust-lang.org/cargo/reference/registries.html)、git、文件夹等资源来解析依赖项。"
#: src/cargo/rust-ecosystem.md:34
msgid ""
"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the "
"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018."
-msgstr ""
-"Rust 也有三个\\[版本\\]:当前版本是 Rust 2021。之前的 版本是 Rust 2015 和 "
-"Rust 2018。"
+msgstr "Rust 也有三个\\[版本\\]:当前版本是 Rust 2021。之前的 版本是 Rust 2015 和 Rust 2018。"
#: src/cargo/rust-ecosystem.md:37
msgid ""
@@ -1727,9 +1859,7 @@ msgstr "这些版本支持对语言进行向后不兼容的 更改。"
msgid ""
"To prevent breaking code, editions are opt-in: you select the edition for "
"your crate via the `Cargo.toml` file."
-msgstr ""
-"为防止破坏代码,你可以自行选择版本: 通过 `Cargo.toml` 文件为 crate 选择合适"
-"的版本。"
+msgstr "为防止破坏代码,你可以自行选择版本: 通过 `Cargo.toml` 文件为 crate 选择合适的版本。"
#: src/cargo/rust-ecosystem.md:43
msgid ""
@@ -1741,17 +1871,14 @@ msgstr "为免分割生态系统,Rust 编译器可以混合使用 为不同版
msgid ""
"Mention that it is quite rare to ever use the compiler directly not through "
"`cargo` (most users never do)."
-msgstr ""
-"提及不通过 `cargo` 而直接使用编译器的情况相当少见(大多数用户从不这样做)。"
+msgstr "提及不通过 `cargo` 而直接使用编译器的情况相当少见(大多数用户从不这样做)。"
#: src/cargo/rust-ecosystem.md:48
msgid ""
"It might be worth alluding that Cargo itself is an extremely powerful and "
"comprehensive tool. It is capable of many advanced features including but "
"not limited to: "
-msgstr ""
-"值得注意的是,Cargo 本身就是一个功能强大且全面的工具。它能够实现许多高级功"
-"能,包括但不限于:"
+msgstr "值得注意的是,Cargo 本身就是一个功能强大且全面的工具。它能够实现许多高级功能,包括但不限于:"
#: src/cargo/rust-ecosystem.md:49
msgid "Project/package structure"
@@ -1767,14 +1894,14 @@ msgstr "开发依赖项和运行时依赖项管理/缓存"
#: src/cargo/rust-ecosystem.md:52
msgid ""
-"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts."
-"html)"
+"[build "
+"scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.html)"
msgstr "\\[构建脚本\\]"
#: src/cargo/rust-ecosystem.md:53
msgid ""
-"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install."
-"html)"
+"[global "
+"installation](https://doc.rust-lang.org/cargo/commands/cargo-install.html)"
msgstr "\\[全局安装\\] \\]"
#: src/cargo/rust-ecosystem.md:54
@@ -1782,8 +1909,7 @@ msgid ""
"It is also extensible with sub command plugins as well (such as [cargo "
"clippy](https://github.com/rust-lang/rust-clippy))."
msgstr ""
-"它还可以使用子命令插件(例如 [cargo clippy](https://github.com/rust-lang/"
-"rust-clippy))进行扩展。"
+"它还可以使用子命令插件(例如 [cargo clippy](https://github.com/rust-lang/rust-clippy))进行扩展。"
#: src/cargo/rust-ecosystem.md:55
msgid ""
@@ -1799,9 +1925,7 @@ msgid ""
"For this training, we will mostly explore the Rust language through examples "
"which can be executed through your browser. This makes the setup much easier "
"and ensures a consistent experience for everyone."
-msgstr ""
-"在本培训中,我们将主要通过示例 探索 Rust 语言,这些示例可通过浏览器执行。这能"
-"大大简化设置过程, 并确保所有人都能获得一致的体验。"
+msgstr "在本培训中,我们将主要通过示例 探索 Rust 语言,这些示例可通过浏览器执行。这能大大简化设置过程, 并确保所有人都能获得一致的体验。"
#: src/cargo/code-samples.md:7
msgid ""
@@ -1809,8 +1933,7 @@ msgid ""
"the exercises. On the last day, we will do a larger exercise which shows you "
"how to work with dependencies and for that you need Cargo."
msgstr ""
-"我们仍然建议你安装 Cargo:它有助于你更轻松地完成 练习。在最后一天,我们要做一"
-"个更大的练习, 向你展示如何使用依赖项,因此你需要安装 Cargo。"
+"我们仍然建议你安装 Cargo:它有助于你更轻松地完成 练习。在最后一天,我们要做一个更大的练习, 向你展示如何使用依赖项,因此你需要安装 Cargo。"
#: src/cargo/code-samples.md:11
msgid "The code blocks in this course are fully interactive:"
@@ -1835,6 +1958,7 @@ msgid "You can use "
msgstr "当文本框为 焦点时,你可以使用 "
#: src/cargo/code-samples.md:19
+#, fuzzy
msgid "to execute the code when focus is in the text box."
msgstr "来执行代码。"
@@ -1842,26 +1966,20 @@ msgstr "来执行代码。"
msgid ""
"Most code samples are editable like shown above. A few code samples are not "
"editable for various reasons:"
-msgstr ""
-"大多数代码示例都可修改(如上图所示)。少数代码示例 可能会因各种原因而不可修"
-"改:"
+msgstr "大多数代码示例都可修改(如上图所示)。少数代码示例 可能会因各种原因而不可修改:"
#: src/cargo/code-samples.md:27
msgid ""
"The embedded playgrounds cannot execute unit tests. Copy-paste the code and "
"open it in the real Playground to demonstrate unit tests."
-msgstr ""
-"嵌入式 Playground 无法执行单元测试。将代码复制并粘贴 到实际 Playground 中,以"
-"演示单元测试。"
+msgstr "嵌入式 Playground 无法执行单元测试。将代码复制并粘贴 到实际 Playground 中,以演示单元测试。"
#: src/cargo/code-samples.md:30
msgid ""
"The embedded playgrounds lose their state the moment you navigate away from "
"the page! This is the reason that the students should solve the exercises "
"using a local Rust installation or via the Playground."
-msgstr ""
-"嵌入式 Playground 会在你离开页面后立即 丢失其状态!正因如此,学员应使用本地安"
-"装的 Rust 或通过 Playground 解题。"
+msgstr "嵌入式 Playground 会在你离开页面后立即 丢失其状态!正因如此,学员应使用本地安装的 Rust 或通过 Playground 解题。"
#: src/cargo/running-locally.md:1
msgid "Running Code Locally with Cargo"
@@ -1875,10 +1993,9 @@ msgid ""
"should give you a working `rustc` and `cargo`. At the time of writing, the "
"latest stable Rust release has these version numbers:"
msgstr ""
-"如果你想在自己的系统上对代码进行实验, 则需要先安装 Rust。为此,请按照 [Rust "
-"图书中的 说明](https://doc.rust-lang.org/book/ch01-01-installation.html)操"
-"作。这应会为你提供一个有效的 `rustc` 和 `cargo`。在撰写 本文时,最新的 Rust "
-"稳定版具有以下版本号:"
+"如果你想在自己的系统上对代码进行实验, 则需要先安装 Rust。为此,请按照 [Rust 图书中的 "
+"说明](https://doc.rust-lang.org/book/ch01-01-installation.html)操作。这应会为你提供一个有效的 "
+"`rustc` 和 `cargo`。在撰写 本文时,最新的 Rust 稳定版具有以下版本号:"
#: src/cargo/running-locally.md:15
msgid ""
@@ -1890,8 +2007,7 @@ msgstr "您也可以使用任何更高版本,因为 Rust 保持向后兼容性
msgid ""
"With this in place, follow these steps to build a Rust binary from one of "
"the examples in this training:"
-msgstr ""
-"了解这些信息后,请按照以下步骤从本培训中的 一个示例中构建 Rust 二进制文件:"
+msgstr "了解这些信息后,请按照以下步骤从本培训中的 一个示例中构建 Rust 二进制文件:"
#: src/cargo/running-locally.md:20
msgid "Click the \"Copy to clipboard\" button on the example you want to copy."
@@ -1911,9 +2027,7 @@ msgstr "导航至 `exercise/` 并使用 `cargo run` 构建并运行你的二进
msgid ""
"Replace the boiler-plate code in `src/main.rs` with your own code. For "
"example, using the example on the previous page, make `src/main.rs` look like"
-msgstr ""
-"将 `src/main.rs` 中的样板代码替换为你自己的代码。例如, 使用上一页中的示例,"
-"将 `src/main.rs` 改为:"
+msgstr "将 `src/main.rs` 中的样板代码替换为你自己的代码。例如, 使用上一页中的示例,将 `src/main.rs` 改为:"
#: src/cargo/running-locally.md:43
msgid ""
@@ -1936,31 +2050,27 @@ msgstr "使用 `cargo run` 构建并运行你更新后的二进制文件:"
#: src/cargo/running-locally.md:59
msgid ""
"Use `cargo check` to quickly check your project for errors, use `cargo "
-"build` to compile it without running it. You will find the output in `target/"
-"debug/` for a normal debug build. Use `cargo build --release` to produce an "
-"optimized release build in `target/release/`."
+"build` to compile it without running it. You will find the output in "
+"`target/debug/` for a normal debug build. Use `cargo build --release` to "
+"produce an optimized release build in `target/release/`."
msgstr ""
-"使用 `cargo check` 快速检查项目是否存在错误;使用 `cargo build` 只进行编译,"
-"而不运行。你可以在 `target/debug/` 中找到常规调试 build 的输出。使用 `cargo "
-"build --release` 在 `target/release/` 中生成经过优化的 发布 build。"
+"使用 `cargo check` 快速检查项目是否存在错误;使用 `cargo build` 只进行编译,而不运行。你可以在 "
+"`target/debug/` 中找到常规调试 build 的输出。使用 `cargo build --release` 在 "
+"`target/release/` 中生成经过优化的 发布 build。"
#: src/cargo/running-locally.md:64
msgid ""
"You can add dependencies for your project by editing `Cargo.toml`. When you "
"run `cargo` commands, it will automatically download and compile missing "
"dependencies for you."
-msgstr ""
-"你可以通过修改 `Cargo.toml` 为项目添加依赖项。当你 运行 `cargo` 命令时,系统"
-"会自动为你下载和编译缺失 的依赖项。"
+msgstr "你可以通过修改 `Cargo.toml` 为项目添加依赖项。当你 运行 `cargo` 命令时,系统会自动为你下载和编译缺失 的依赖项。"
#: src/cargo/running-locally.md:72
msgid ""
"Try to encourage the class participants to install Cargo and use a local "
"editor. It will make their life easier since they will have a normal "
"development environment."
-msgstr ""
-"尽量鼓励全班学员安装 Cargo 并使用 本地编辑器。这能为他们营造常规 开发环境,让"
-"工作变得更加轻松。"
+msgstr "尽量鼓励全班学员安装 Cargo 并使用 本地编辑器。这能为他们营造常规 开发环境,让工作变得更加轻松。"
#: src/welcome-day-1.md:1
msgid "Welcome to Day 1"
@@ -1977,16 +2087,13 @@ msgstr "现在是学习 Comprehensive Rust 的第一天。今天我们会涉及
msgid ""
"Basic Rust syntax: variables, scalar and compound types, enums, structs, "
"references, functions, and methods."
-msgstr ""
-"Rust 基本语法:变量,标量(scalar)和复合(compound)类型,枚举(enum),结构"
-"体(struct),引用,函数和方法。"
+msgstr "Rust 基本语法:变量,标量(scalar)和复合(compound)类型,枚举(enum),结构体(struct),引用,函数和方法。"
#: src/welcome-day-1.md:9
msgid ""
"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, and "
"`continue`."
-msgstr ""
-"控制流的构造: `if`, `if let`, `while`, `while let`, `break`, 和 `continue`。"
+msgstr "控制流的构造: `if`, `if let`, `while`, `while let`, `break`, 和 `continue`。"
#: src/welcome-day-1.md:12
msgid "Pattern matching: destructuring enums, structs, and arrays."
@@ -1997,8 +2104,7 @@ msgid "Please remind the students that:"
msgstr "请提醒学生:"
#: src/welcome-day-1.md:18
-msgid ""
-"They should ask questions when they get them, don't save them to the end."
+msgid "They should ask questions when they get them, don't save them to the end."
msgstr "他们可以随时提问,不需要留到最后。"
#: src/welcome-day-1.md:19
@@ -2011,14 +2117,12 @@ msgstr "这个课程本应该是互动的,我们鼓励大家积极讨论。"
#, fuzzy
msgid ""
"As an instructor, you should try to keep the discussions relevant, i.e., "
-"keep the discussions related to how Rust does things vs some other "
-"language. It can be hard to find the right balance, but err on the side of "
-"allowing discussions since they engage people much more than one-way "
-"communication."
+"keep the discussions related to how Rust does things vs some other language. "
+" It can be hard to find the right balance, but err on the side of allowing "
+"discussions since they engage people much more than one-way communication."
msgstr ""
-"作为讲师,你应该尽量保证讨论话题的相关性,例如,讨论围绕Rust是如何做某些事"
-"情,而不是其他的语言如何如何。 这个平衡点不容易找到,但是尽量倾向于允许 讨"
-"论,因为讨论比起单方面的灌输更有利于让大家投入。"
+"作为讲师,你应该尽量保证讨论话题的相关性,例如,讨论围绕Rust是如何做某些事情,而不是其他的语言如何如何。 这个平衡点不容易找到,但是尽量倾向于允许 "
+"讨论,因为讨论比起单方面的灌输更有利于让大家投入。"
#: src/welcome-day-1.md:24
msgid ""
@@ -2030,9 +2134,7 @@ msgid ""
"This is perfectly okay! Repetition is an important part of learning. "
"Remember that the slides are just a support and you are free to skip them as "
"you like."
-msgstr ""
-"这完全没有问题! 重复是学习的一个重要方法。请记得 这些幻灯片只是一个辅助,你可"
-"以选择性地跳过。"
+msgstr "这完全没有问题! 重复是学习的一个重要方法。请记得 这些幻灯片只是一个辅助,你可以选择性地跳过。"
#: src/welcome-day-1.md:29
msgid ""
@@ -2040,16 +2142,13 @@ msgid ""
"speak about the famous borrow checker. The way Rust handles memory is a "
"major feature and we should show students this right away."
msgstr ""
-"第一天的主要目标是要谈到著名的 borrow checker,其他方面点到为止。Rust 处理内"
-"存的方式是其主要特点,这点我们应该尽早展示给学生。"
+"第一天的主要目标是要谈到著名的 borrow checker,其他方面点到为止。Rust 处理内存的方式是其主要特点,这点我们应该尽早展示给学生。"
#: src/welcome-day-1.md:33
msgid ""
"If you're teaching this in a classroom, this is a good place to go over the "
"schedule. We suggest splitting the day into two parts (following the slides):"
-msgstr ""
-"如果你是在教室里教授此课程,不妨在这里介绍一下时间安排。 这边建议是把每天分成"
-"两部分(跟着幻灯片来):"
+msgstr "如果你是在教室里教授此课程,不妨在这里介绍一下时间安排。 这边建议是把每天分成两部分(跟着幻灯片来):"
#: src/welcome-day-1.md:36
msgid "Morning: 9:00 to 12:00,"
@@ -2063,17 +2162,15 @@ msgstr "下午:13:00 到 16:00。"
msgid ""
"You can of course adjust this as necessary. Please make sure to include "
"breaks, we recommend a break every hour!"
-msgstr ""
-"当然你也可以看情况调整时间。但是请务必记得提供休息时间。我们建议每个小时休息"
-"一次!"
+msgstr "当然你也可以看情况调整时间。但是请务必记得提供休息时间。我们建议每个小时休息一次!"
#: src/welcome-day-1/what-is-rust.md:3
msgid ""
-"Rust is a new programming language which had its [1.0 release in 2015]"
-"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):"
+"Rust is a new programming language which had its [1.0 release in "
+"2015](https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):"
msgstr ""
-"Rust 是一种新的编程语言,它的[1.0 版本于 2015 年发布](https://blog.rust-lang."
-"org/2015/05/15/Rust-1.0.html):"
+"Rust 是一种新的编程语言,它的[1.0 版本于 2015 "
+"年发布](https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):"
#: src/welcome-day-1/what-is-rust.md:5
msgid "Rust is a statically compiled language in a similar role as C++"
@@ -2085,11 +2182,11 @@ msgstr "`rustc` 使用 LLVM 作为它的后端。"
#: src/welcome-day-1/what-is-rust.md:7
msgid ""
-"Rust supports many [platforms and architectures](https://doc.rust-lang.org/"
-"nightly/rustc/platform-support.html):"
+"Rust supports many [platforms and "
+"architectures](https://doc.rust-lang.org/nightly/rustc/platform-support.html):"
msgstr ""
-"Rust 支持多种[平台和架构](https://doc.rust-lang.org/nightly/rustc/platform-"
-"support.html):"
+"Rust "
+"支持多种[平台和架构](https://doc.rust-lang.org/nightly/rustc/platform-support.html):"
#: src/welcome-day-1/what-is-rust.md:9
msgid "x86, ARM, WebAssembly, ..."
@@ -2137,8 +2234,7 @@ msgstr "高度的控制能力。"
#: src/welcome-day-1/what-is-rust.md:25
#, fuzzy
-msgid ""
-"Can be scaled down to very constrained devices such as microcontrollers."
+msgid "Can be scaled down to very constrained devices such as microcontrollers."
msgstr "能够在资源极度有限的设备(如手机)上运行。"
#: src/welcome-day-1/what-is-rust.md:26
@@ -2199,18 +2295,14 @@ msgid ""
"This slide tries to make the students comfortable with Rust code. They will "
"see a ton of it over the next three days so we start small with something "
"familiar."
-msgstr ""
-"这张幻灯片试图让学生们熟悉 Rust 代码。在接下来的四天里,他们会看到很多 Rust "
-"代码, 所以我们从一些熟悉的东西开始。"
+msgstr "这张幻灯片试图让学生们熟悉 Rust 代码。在接下来的四天里,他们会看到很多 Rust 代码, 所以我们从一些熟悉的东西开始。"
#: src/hello-world.md:27
#, fuzzy
msgid ""
"Rust is very much like other languages in the C/C++/Java tradition. It is "
"imperative and it doesn't try to reinvent things unless absolutely necessary."
-msgstr ""
-"Rust 非常像 C/C++/Java 等其他传统语言。它是指令式语言(而非函数式),而且除非"
-"绝对必要,它不会尝试重新发明新的概念。"
+msgstr "Rust 非常像 C/C++/Java 等其他传统语言。它是指令式语言(而非函数式),而且除非绝对必要,它不会尝试重新发明新的概念。"
#: src/hello-world.md:31
msgid "Rust is modern with full support for things like Unicode."
@@ -2221,19 +2313,16 @@ msgid ""
"Rust uses macros for situations where you want to have a variable number of "
"arguments (no function [overloading](basic-syntax/functions-interlude.md))."
msgstr ""
-"在需要处理可变数量的参数的情况下,Rust 使用宏(没有函数[重载](basic-syntax/"
-"functions-interlude.md))。"
+"在需要处理可变数量的参数的情况下,Rust 使用宏(没有函数[重载](basic-syntax/functions-interlude.md))。"
#: src/hello-world.md:36
msgid ""
"Macros being 'hygienic' means they don't accidentally capture identifiers "
"from the scope they are used in. Rust macros are actually only [partially "
-"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene."
-"html)."
+"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html)."
msgstr ""
-"宏是“卫生的”意味着它们不会意外地捕获它们所在作用域中的标识符。Rust 的宏实际上"
-"只是[部分卫生](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene."
-"html)。"
+"宏是“卫生的”意味着它们不会意外地捕获它们所在作用域中的标识符。Rust "
+"的宏实际上只是[部分卫生](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html)。"
#: src/hello-world.md:40
msgid ""
@@ -2242,6 +2331,8 @@ msgid ""
"while it is not a functional language, it includes a range of [functional "
"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html)."
msgstr ""
+"Rust "
+"是多范式编程语言。例如,它具有强大的[面向对象的编程功能](https://doc.rust-lang.org/book/ch17-00-oop.html),虽然它不是函数式语言,但包括一系列的[函数概念](https://doc.rust-lang.org/book/ch13-00-functional-features.html)。"
#: src/hello-world/small-example.md:3
msgid "Here is a small example program in Rust:"
@@ -2286,18 +2377,14 @@ msgid ""
"The code implements the Collatz conjecture: it is believed that the loop "
"will always end, but this is not yet proved. Edit the code and play with "
"different inputs."
-msgstr ""
-"这段代码实现了 Collatz 猜想:猜想认为该循环总是会结束,但该猜想还没有被证明。"
-"可以编辑代码来尝试不同的输入。"
+msgstr "这段代码实现了 Collatz 猜想:猜想认为该循环总是会结束,但该猜想还没有被证明。可以编辑代码来尝试不同的输入。"
#: src/hello-world/small-example.md:29
msgid ""
"Explain that all variables are statically typed. Try removing `i32` to "
"trigger type inference. Try with `i8` instead and trigger a runtime integer "
"overflow."
-msgstr ""
-"说明所有变量的类型都是静态的。尝试删除 `i32` 来触发类型推断。尝试使用 `i8` 来"
-"触发运行时整数溢出。"
+msgstr "说明所有变量的类型都是静态的。尝试删除 `i32` 来触发类型推断。尝试使用 `i8` 来触发运行时整数溢出。"
#: src/hello-world/small-example.md:32
msgid "Change `let mut x` to `let x`, discuss the compiler error."
@@ -2317,18 +2404,17 @@ msgstr "展示如何使用 `{}` 作为占位符,来输出比单个变量更复
#: src/hello-world/small-example.md:40
msgid ""
-"Show the students the standard library, show them how to search for `std::"
-"fmt` which has the rules of the formatting mini-language. It's important "
-"that the students become familiar with searching in the standard library."
-msgstr ""
-"向学生展示标准库,展示如何搜索 `std::fmt`,其中包含用于格式化字符串的微型语言"
-"规则。要点是让学生熟悉在标准库中搜索的过程。"
+"Show the students the standard library, show them how to search for "
+"`std::fmt` which has the rules of the formatting mini-language. It's "
+"important that the students become familiar with searching in the standard "
+"library."
+msgstr "向学生展示标准库,展示如何搜索 `std::fmt`,其中包含用于格式化字符串的微型语言规则。要点是让学生熟悉在标准库中搜索的过程。"
#: src/hello-world/small-example.md:44
msgid ""
"In a shell `rustup doc std::fmt` will open a browser on the local std::fmt "
"documentation"
-msgstr ""
+msgstr "在 shell 中,运行“rustup doc std::fmt”会在浏览器中打开本地 std::fmt 文档"
#: src/why-rust.md:3
msgid "Some unique selling points of Rust:"
@@ -2359,9 +2445,8 @@ msgid ""
"have the memory unsafety issues. In addition, you get a modern language with "
"constructs like pattern matching and built-in dependency management."
msgstr ""
-"使用过 C 或 C++:Rust 利用\"借用检查\"消除了一类 _运行时错误_ 。你可以达到堪"
-"比 C 和 C++ 的性能,而没有内存不安全的问题。并且你还可以得到些现代的语言构"
-"造,比如模式匹配和内置依赖管理。"
+"使用过 C 或 C++:Rust 利用\"借用检查\"消除了一类 _运行时错误_ 。你可以达到堪比 C 和 C++ "
+"的性能,而没有内存不安全的问题。并且你还可以得到些现代的语言构造,比如模式匹配和内置依赖管理。"
#: src/why-rust.md:19
msgid ""
@@ -2370,9 +2455,9 @@ msgid ""
"addition you get fast and predictable performance like C and C++ (no garbage "
"collector) as well as access to low-level hardware (should you need it)"
msgstr ""
-"使用过 Java, Go, Python, JavaScript...:你可以得到和这些语言相同的内存安全特"
-"性,并拥有类似的使用高级语言的感受。同时你可以得到类似 C 和 C++ 的高速且可预"
-"测的执行性能(无垃圾回收机制),以及在需要时对底层硬件的访问。"
+"使用过 Java, Go, Python, "
+"JavaScript...:你可以得到和这些语言相同的内存安全特性,并拥有类似的使用高级语言的感受。同时你可以得到类似 C 和 C++ "
+"的高速且可预测的执行性能(无垃圾回收机制),以及在需要时对底层硬件的访问。"
#: src/why-rust/an-example-in-c.md:4
msgid "Let's consider the following \"minimum wrong example\" program in C:"
@@ -2393,7 +2478,8 @@ msgid ""
"\n"
"\tswitch (argc) {\n"
"\t\tcase 1:\n"
-"\t\t\tprintf(\"Too few arguments!\\n\");\n"
+"\t\t\tprintf(\"Too few arguments!\\n"
+"\");\n"
"\t\t\treturn 1;\n"
"\n"
"\t\tcase 2:\n"
@@ -2403,7 +2489,8 @@ msgid ""
"\t\t\t\n"
"\t\t\tbuf = (char*)malloc(len);\n"
"\t\t\tif (!buf)\n"
-"\t\t\t\tprintf(\"malloc failed!\\n\", len);\n"
+"\t\t\t\tprintf(\"malloc failed!\\n"
+"\", len);\n"
"\t\t\t\treturn 1;\n"
"\n"
"\t\t\tfp = fopen(filename, \"rb\");\n"
@@ -2411,10 +2498,12 @@ msgid ""
"\t\t\tif (bytes = st.st_size)\n"
"\t\t\t\tprintf(\"%s\", buf);\n"
"\t\t\telse\n"
-"\t\t\t\tprintf(\"fread failed!\\n\");\n"
+"\t\t\t\tprintf(\"fread failed!\\n"
+"\");\n"
"\n"
"\t\tcase 3:\n"
-"\t\t\tprintf(\"Too many arguments!\\n\");\n"
+"\t\t\tprintf(\"Too many arguments!\\n"
+"\");\n"
"\t\t\treturn 1;\n"
"\t}\n"
"\n"
@@ -2492,21 +2581,20 @@ msgstr ""
#: src/why-rust/an-example-in-c.md:71
msgid ""
"Assignment `=` instead of equality comparison `==`: [The Linux Backdoor "
-"Attempt of 2003](https://freedom-to-tinker.com/2013/10/09/the-linux-backdoor-"
-"attempt-of-2003)"
+"Attempt of "
+"2003](https://freedom-to-tinker.com/2013/10/09/the-linux-backdoor-attempt-of-2003)"
msgstr ""
#: src/why-rust/an-example-in-c.md:72
msgid ""
-"Forgotten braces in multi-line `if`: [The Apple goto fail vulnerability]"
-"(https://dwheeler.com/essays/apple-goto-fail.html)"
+"Forgotten braces in multi-line `if`: [The Apple goto fail "
+"vulnerability](https://dwheeler.com/essays/apple-goto-fail.html)"
msgstr ""
#: src/why-rust/an-example-in-c.md:73
msgid ""
-"Forgotten `break` in a `switch` statement: [The break that broke sudo]"
-"(https://nakedsecurity.sophos.com/2012/05/21/anatomy-of-a-security-hole-the-"
-"break-that-broke-sudo)"
+"Forgotten `break` in a `switch` statement: [The break that broke "
+"sudo](https://nakedsecurity.sophos.com/2012/05/21/anatomy-of-a-security-hole-the-break-that-broke-sudo)"
msgstr ""
#: src/why-rust/an-example-in-c.md:75
@@ -2601,37 +2689,39 @@ msgid "No iterator invalidation."
msgstr "不存在迭代器失效。"
#: src/why-rust/compile-time.md:16
-msgid ""
-"It is possible to produce memory leaks in (safe) Rust. Some examples are:"
+msgid "It is possible to produce memory leaks in (safe) Rust. Some examples are:"
msgstr "在(安全的)Rust 中也有可能产生内存泄漏。例如:"
#: src/why-rust/compile-time.md:19
#, fuzzy
msgid ""
-"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box."
-"html#method.leak) to leak a pointer. A use of this could be to get runtime-"
-"initialized and runtime-sized static variables"
+"You can use "
+"[`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak) "
+"to leak a pointer. A use of this could be to get runtime-initialized and "
+"runtime-sized static variables"
msgstr ""
-"可以使用 [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box."
-"html#method.leak) 来泄漏一个指针。该方法可以用于得到在运行时决定大小和初始化"
-"的静态变量"
+"可以使用 "
+"[`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak) "
+"来泄漏一个指针。该方法可以用于得到在运行时决定大小和初始化的静态变量"
#: src/why-rust/compile-time.md:21
msgid ""
-"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget."
-"html) to make the compiler \"forget\" about a value (meaning the destructor "
-"is never run)."
+"You can use "
+"[`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.html) to "
+"make the compiler \"forget\" about a value (meaning the destructor is never "
+"run)."
msgstr ""
-"可以使用 [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget."
-"html) 来让编译器“忘记”一个值(即其析构函数不会被执行)。"
+"可以使用 [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.html) "
+"来让编译器“忘记”一个值(即其析构函数不会被执行)。"
#: src/why-rust/compile-time.md:23
msgid ""
-"You can also accidentally create a [reference cycle](https://doc.rust-lang."
-"org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`."
+"You can also accidentally create a [reference "
+"cycle](https://doc.rust-lang.org/book/ch15-06-reference-cycles.html) with "
+"`Rc` or `Arc`."
msgstr ""
-"可以使用 `Rc` 或 `Arc` 意外创建一个循环引用([reference cycle](https://doc."
-"rust-lang.org/book/ch15-06-reference-cycles.html))。"
+"可以使用 `Rc` 或 `Arc` 意外创建一个循环引用([reference "
+"cycle](https://doc.rust-lang.org/book/ch15-06-reference-cycles.html))。"
#: src/why-rust/compile-time.md:25
msgid ""
@@ -2661,16 +2751,16 @@ msgstr "整数溢出的行为有明确定义。"
#: src/why-rust/runtime.md:12
#, fuzzy
msgid ""
-"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-"
-"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time "
-"flag. If enabled, the program will panic (a controlled crash of the "
-"program), otherwise you get wrap-around semantics. By default, you get "
+"Integer overflow is defined via the "
+"[`overflow-checks`](https://doc.rust-lang.org/rustc/codegen-options/index.html#overflow-checks) "
+"compile-time flag. If enabled, the program will panic (a controlled crash of "
+"the program), otherwise you get wrap-around semantics. By default, you get "
"panics in debug mode (`cargo build`) and wrap-around in release mode (`cargo "
"build --release`)."
msgstr ""
-"整数溢出的行为由编译时的标志指定。可以选择 panic(一种受控的程序崩溃)或使"
-"用“绕回(wrap-around)”语义。默认情况下,使用调试模式编译(`cargo build`)的"
-"行为为 panic,使用发布模式编译(`cargo build --release`)的行为为“绕回”。"
+"整数溢出的行为由编译时的标志指定。可以选择 "
+"panic(一种受控的程序崩溃)或使用“绕回(wrap-around)”语义。默认情况下,使用调试模式编译(`cargo build`)的行为为 "
+"panic,使用发布模式编译(`cargo build --release`)的行为为“绕回”。"
#: src/why-rust/runtime.md:18
msgid ""
@@ -2679,8 +2769,8 @@ msgid ""
"call functions such as `slice::get_unchecked` which does not do bounds "
"checking."
msgstr ""
-"边界检查不能使用编译标志禁用,也不能直接通过 `unsafe` 关键字禁用。然而, "
-"`unsafe` 允许你调用 `slice::get_unchecked` 等不做边界检查的函数。"
+"边界检查不能使用编译标志禁用,也不能直接通过 `unsafe` 关键字禁用。然而, `unsafe` 允许你调用 "
+"`slice::get_unchecked` 等不做边界检查的函数。"
#: src/why-rust/modern.md:3
#, fuzzy
@@ -2734,9 +2824,8 @@ msgid ""
"writing a loop using `for` should result in roughly the same low level "
"instructions as using the `.iter().fold()` construct."
msgstr ""
-"与 C++ 类似的零成本抽象,意味着你不需要为高级程序语言的结构“付出”更多的内存"
-"和 CPU。例如使用 `for` 循环与使用 `.iter().fold()` 结构应该会生成大致相同的底"
-"层指令。"
+"与 C++ 类似的零成本抽象,意味着你不需要为高级程序语言的结构“付出”更多的内存和 CPU。例如使用 `for` 循环与使用 "
+"`.iter().fold()` 结构应该会生成大致相同的底层指令。"
#: src/why-rust/modern.md:28
msgid ""
@@ -2744,8 +2833,8 @@ msgid ""
"known as 'sum types', which allow the type system to express things like "
"`Option` and `Result`."
msgstr ""
-"值得一提的是,Rust 的枚举是“代数数据类型”(也叫“和类型”)。它使得类型系统可以"
-"表示 `Option` 和 `Result` 等结构。"
+"值得一提的是,Rust 的枚举是“代数数据类型”(也叫“和类型”)。它使得类型系统可以表示 `Option` 和 `Result` "
+"等结构。"
#: src/why-rust/modern.md:32
msgid ""
@@ -2754,18 +2843,15 @@ msgid ""
"talkative than other compilers. It will often provide you with _actionable_ "
"feedback, ready to copy-paste into your code."
msgstr ""
-"提醒学生去阅读编译错误 --- 许多开发者已经习惯去忽略冗长的编译器输出。Rust 编"
-"译器会比其它编译器更健谈。它通常会提供 _可操作的_ 反馈,可以直接复制粘贴到代"
-"码中。"
+"提醒学生去阅读编译错误 --- 许多开发者已经习惯去忽略冗长的编译器输出。Rust 编译器会比其它编译器更健谈。它通常会提供 _可操作的_ "
+"反馈,可以直接复制粘贴到代码中。"
#: src/why-rust/modern.md:37
msgid ""
"The Rust standard library is small compared to languages like Java, Python, "
"and Go. Rust does not come with several things you might consider standard "
"and essential:"
-msgstr ""
-"相比 Java, Python 和 Go 等语言,Rust 标准库较为精简。Rust 并没有内置一些你可"
-"能认为标准和必要的功能:"
+msgstr "相比 Java, Python 和 Go 等语言,Rust 标准库较为精简。Rust 并没有内置一些你可能认为标准和必要的功能:"
#: src/why-rust/modern.md:41
msgid "a random number generator, but see [rand](https://docs.rs/rand/)."
@@ -2786,35 +2872,32 @@ msgid ""
"Rust community is still working on finding the best solution --- and perhaps "
"there isn't a single \"best solution\" for some of these things."
msgstr ""
-"Rust 这么做的原因是标准库中的功能是无法去除的,因此该功能必须非常稳定。对于以"
-"上例子,Rust 社区仍在寻找最佳解决方案 --- 甚至对一些情况可能没有单一的“最佳解"
-"决方案”。"
+"Rust 这么做的原因是标准库中的功能是无法去除的,因此该功能必须非常稳定。对于以上例子,Rust 社区仍在寻找最佳解决方案 --- "
+"甚至对一些情况可能没有单一的“最佳解决方案”。"
#: src/why-rust/modern.md:50
msgid ""
"Rust comes with a built-in package manager in the form of Cargo and this "
"makes it trivial to download and compile third-party crates. A consequence "
"of this is that the standard library can be smaller."
-msgstr ""
-"Rust 内置了一个包管理器 Cargo,使得下载和编译第三方 crate 变得简单。这也导致"
-"标准库可以更加精简。"
+msgstr "Rust 内置了一个包管理器 Cargo,使得下载和编译第三方 crate 变得简单。这也导致标准库可以更加精简。"
#: src/why-rust/modern.md:54
msgid ""
-"Discovering good third-party crates can be a problem. Sites like help with this by letting you compare health metrics for crates to "
-"find a good and trusted one."
+"Discovering good third-party crates can be a problem. Sites like "
+" help with this by letting you compare health metrics for "
+"crates to find a good and trusted one."
msgstr ""
-"发现高质量的第三方 crate 也许是一个问题。 等网站对此问题有"
-"所帮助。它能帮你比较 crate 的健康指标,以找到一个高质量并受信任的 crate。"
+"发现高质量的第三方 crate 也许是一个问题。 等网站对此问题有所帮助。它能帮你比较 crate "
+"的健康指标,以找到一个高质量并受信任的 crate。"
#: src/why-rust/modern.md:58
msgid ""
"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP "
"implementation used in major IDEs and text editors."
msgstr ""
-"[rust-analyzer](https://rust-analyzer.github.io/) 是一个受到广泛支持的 LSP 实"
-"现,被主流的 IDE 和文本编辑器所使用。"
+"[rust-analyzer](https://rust-analyzer.github.io/) 是一个受到广泛支持的 LSP 实现,被主流的 IDE "
+"和文本编辑器所使用。"
#: src/basic-syntax.md:3
msgid "Much of the Rust syntax will be familiar to you from C, C++ or Java:"
@@ -2838,12 +2921,14 @@ msgstr "`if` 和 `while` 等关键词作用与以上语言一致。"
msgid "Variable assignment is done with `=`, comparison is done with `==`."
msgstr "变量赋值使用 `=`,值之间比较使用 `==`。"
-#: src/basic-syntax/scalar-types.md:3 src/basic-syntax/compound-types.md:3
+#: src/basic-syntax/scalar-types.md:3
+#: src/basic-syntax/compound-types.md:3
#: src/exercises/day-3/safe-ffi-wrapper.md:16
msgid "Types"
msgstr "类型"
-#: src/basic-syntax/scalar-types.md:3 src/basic-syntax/compound-types.md:3
+#: src/basic-syntax/scalar-types.md:3
+#: src/basic-syntax/compound-types.md:3
msgid "Literals"
msgstr "字面量"
@@ -2950,12 +3035,14 @@ msgstr "上表中还有一些未提及的语法:"
#: src/basic-syntax/scalar-types.md:23
msgid ""
-"Raw strings allow you to create a `&str` value with escapes disabled: "
-"`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal "
-"amount of `#` on either side of the quotes:"
+"Raw strings allow you to create a `&str` value with escapes disabled: `r\"\\n"
+"\" == \"\\\\n"
+"\"`. You can embed double-quotes by using an equal amount of `#` on either "
+"side of the quotes:"
msgstr ""
-"原始字符串可在创建 `&str` 时禁用转义:`r\"\\n\" == \"\\\\n\"`。可以在外层引号"
-"两侧添加相同数量的 `#`,以在字符串中嵌入双引号:"
+"原始字符串可在创建 `&str` 时禁用转义:`r\"\\n"
+"\" == \"\\\\n"
+"\"`。可以在外层引号两侧添加相同数量的 `#`,以在字符串中嵌入双引号:"
#: src/basic-syntax/scalar-types.md:35
msgid "Byte strings allow you to create a `&[u8]` value directly:"
@@ -2967,6 +3054,7 @@ msgid ""
"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written "
"as `123i64`."
msgstr ""
+"数字中的所有下划线均可忽略,它们只是为了方便辨识。因此,“1_000”可以写为“1000”(或“10_00”),而“123_i64”可以写为“123i64”。"
#: src/basic-syntax/compound-types.md:5
msgid "Arrays"
@@ -3012,9 +3100,8 @@ msgid ""
"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two "
"different types."
msgstr ""
-"数组中的元素具有相同的类型 `T`,数组的长度为 `N`,`N` 是一个编译期常量。 需要"
-"注意的是数组的长度是它_类型的一部分\\_, 这意味着 `[u8; 3]` 和 `[u8; 4]` 在 "
-"Rust 中被认为是不同的类型。"
+"数组中的元素具有相同的类型 `T`,数组的长度为 `N`,`N` 是一个编译期常量。 需要注意的是数组的长度是它_类型的一部分\\_, 这意味着 "
+"`[u8; 3]` 和 `[u8; 4]` 在 Rust 中被认为是不同的类型。"
#: src/basic-syntax/compound-types.md:40
msgid "We can use literals to assign values to arrays."
@@ -3027,17 +3114,14 @@ msgid ""
"the debug output. We could also have used `{a}` and `{a:?}` without "
"specifying the value after the format string."
msgstr ""
-"在主函数中,打印(print)语句使用 `?` 格式请求调试实现。 使用参数 `{}` 打印默"
-"认输出,`{:?}` 表示以调试格式输出。 我们也可以不在格式化字符串后面指定变量"
-"值,直接使用 `{a}` 和 `{a:?}` 进行输出。"
+"在主函数中,打印(print)语句使用 `?` 格式请求调试实现。 使用参数 `{}` 打印默认输出,`{:?}` 表示以调试格式输出。 "
+"我们也可以不在格式化字符串后面指定变量值,直接使用 `{a}` 和 `{a:?}` 进行输出。"
#: src/basic-syntax/compound-types.md:47
msgid ""
"Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be "
"easier to read."
-msgstr ""
-"添加 `#`, 比如 `{a:#?}`, 会输出“美观打印(pretty printing)” 格式, 这种格式可"
-"能会更加易读。"
+msgstr "添加 `#`, 比如 `{a:#?}`, 会输出“美观打印(pretty printing)” 格式, 这种格式可能会更加易读。"
#: src/basic-syntax/compound-types.md:49
msgid "Tuples:"
@@ -3064,9 +3148,8 @@ msgid ""
"value are expressed as `()`. It is used to indicate, for example, that a "
"function or expression has no return value, as we'll see in a future slide. "
msgstr ""
-"空元组 `()` 也被称作 “单元(unit)类型”. 它既是一个类型, 也是这种类型的唯一"
-"值——也就是说它的类型和它的 值都被表示为 `()`。它通常用于表示,比如,一个 函"
-"数或表达式没有返回值,我们会在后续的幻灯片种见到这种用法。"
+"空元组 `()` 也被称作 “单元(unit)类型”. 它既是一个类型, 也是这种类型的唯一值——也就是说它的类型和它的 值都被表示为 "
+"`()`。它通常用于表示,比如,一个 函数或表达式没有返回值,我们会在后续的幻灯片种见到这种用法。"
#: src/basic-syntax/compound-types.md:61
msgid ""
@@ -3086,24 +3169,19 @@ msgstr "一些注意事项:"
msgid ""
"We must dereference `ref_x` when assigning to it, similar to C and C++ "
"pointers."
-msgstr ""
-"就像 C 与 C++ 中的指针一样,对引用 `ref_x` 进行赋值时,我们必须对其解引用。"
+msgstr "就像 C 与 C++ 中的指针一样,对引用 `ref_x` 进行赋值时,我们必须对其解引用。"
#: src/basic-syntax/references.md:18
msgid ""
"Rust will auto-dereference in some cases, in particular when invoking "
"methods (try `ref_x.count_ones()`)."
-msgstr ""
-"Rust 有时会进行自动解引用。比如调用方法 `ref_x.count_ones()` 时,ref_x 会被解"
-"引用。"
+msgstr "Rust 有时会进行自动解引用。比如调用方法 `ref_x.count_ones()` 时,ref_x 会被解引用。"
#: src/basic-syntax/references.md:20
msgid ""
"References that are declared as `mut` can be bound to different values over "
"their lifetime."
-msgstr ""
-"如果引用值被声明为 `mut`(可变引用),那么这个引用值可以在它的生命周期内被绑"
-"定为不同的值。"
+msgstr "如果引用值被声明为 `mut`(可变引用),那么这个引用值可以在它的生命周期内被绑定为不同的值。"
#: src/basic-syntax/references.md:26
msgid ""
@@ -3112,9 +3190,8 @@ msgid ""
"to different values, while the second represents a reference to a mutable "
"value."
msgstr ""
-"注意 `let mut ref_x: &i32` 与 `let ref_x: &mut i32` 之间的区别。第一条语句声"
-"明了一个可变引用,所以我们可以修改这个引用所绑定的值;第二条语句声明了一个指"
-"向可变变量的引用。"
+"注意 `let mut ref_x: &i32` 与 `let ref_x: &mut i32` "
+"之间的区别。第一条语句声明了一个可变引用,所以我们可以修改这个引用所绑定的值;第二条语句声明了一个指向可变变量的引用。"
#: src/basic-syntax/references-dangling.md:3
msgid "Rust will statically forbid dangling references:"
@@ -3161,16 +3238,14 @@ msgid ""
"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are "
"identical."
msgstr ""
-"如果切片的起始下标为 0, Rust 语法允许我们省略起始下标。比如说 `&a[0..a."
-"len()]` 与 `&a[..a.len()]` 是等价的。"
+"如果切片的起始下标为 0, Rust 语法允许我们省略起始下标。比如说 `&a[0..a.len()]` 与 `&a[..a.len()]` 是等价的。"
#: src/basic-syntax/slices.md:26
#, fuzzy
msgid ""
"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are "
"identical."
-msgstr ""
-"结尾下标也可以用相同方式省略。比如说 `&a[2..a.len()]` 和 `&a[2..]` 是等价的。"
+msgstr "结尾下标也可以用相同方式省略。比如说 `&a[2..a.len()]` 和 `&a[2..]` 是等价的。"
#: src/basic-syntax/slices.md:28
#, fuzzy
@@ -3184,9 +3259,7 @@ msgid ""
"`s` is a reference to a slice of `i32`s. Notice that the type of `s` "
"(`&[i32]`) no longer mentions the array length. This allows us to perform "
"computation on slices of different sizes."
-msgstr ""
-"切片会从另外一个对象中借用数据。在这个例子中, `a` 必须在其切片存活时保持存活"
-"(处于作用域中)。"
+msgstr "切片会从另外一个对象中借用数据。在这个例子中, `a` 必须在其切片存活时保持存活(处于作用域中)。"
#: src/basic-syntax/slices.md:32
#, fuzzy
@@ -3194,9 +3267,8 @@ msgid ""
"Slices always borrow from another object. In this example, `a` has to remain "
"'alive' (in scope) for at least as long as our slice. "
msgstr ""
-"关于修改 `a[3]` 的问题可能会引发精彩的讨论。正确答案是:为了保证内存安全,在"
-"创建切片后,我们不能通过 `a` 来修改数据。不过我们可以通过 `a` 或者 `s` 来读取"
-"数据。我们将会在“借用”章节着重介绍这个内容。"
+"关于修改 `a[3]` 的问题可能会引发精彩的讨论。正确答案是:为了保证内存安全,在创建切片后,我们不能通过 `a` 来修改数据。不过我们可以通过 "
+"`a` 或者 `s` 来读取数据。我们将会在“借用”章节着重介绍这个内容。"
#: src/basic-syntax/slices.md:34
msgid ""
@@ -3207,10 +3279,12 @@ msgid ""
"`println`, when the slice is no longer used. More details will be explained "
"in the borrow checker section."
msgstr ""
+"关于修改“a\\[3\\]”的问题可能会引发一些有趣的讨论,但正解是,出于内存安全方面的原因,您无法在执行作业的这个时间点通过“a”来进行此修改,但可以从“a”和“s”安全地读取数据。它会在您创建 "
+"Slice 之前运作,在“println”之后(不再使用 Slice 时)再次运作。更多详情会在“借用检查器”部分中加以说明。"
#: src/basic-syntax/string-slices.md:1
msgid "`String` vs `str`"
-msgstr ""
+msgstr "“String”与“str”的区别"
#: src/basic-syntax/string-slices.md:3
msgid "We can now understand the two string types in Rust:"
@@ -3252,16 +3326,14 @@ msgid ""
"encoded string data stored in a block of memory. String literals "
"(`”Hello”`), are stored in the program’s binary."
msgstr ""
-"`&str` 引入了一个字符串切片,它是一个指向保存在内存块中的 UTF-8 编码字符串数"
-"据的不可变引用。 字符串字面量(`”Hello”`)会保存在程序的二进制文件中。"
+"`&str` 引入了一个字符串切片,它是一个指向保存在内存块中的 UTF-8 编码字符串数据的不可变引用。 "
+"字符串字面量(`”Hello”`)会保存在程序的二进制文件中。"
#: src/basic-syntax/string-slices.md:30
msgid ""
"Rust’s `String` type is a wrapper around a vector of bytes. As with a "
"`Vec`, it is owned."
-msgstr ""
-"Rust 的 `String` 类型是一个字节 vector 的封装。和 `Vec` 一样,它是拥有所有"
-"权的。"
+msgstr "Rust 的 `String` 类型是一个字节 vector 的封装。和 `Vec` 一样,它是拥有所有权的。"
#: src/basic-syntax/string-slices.md:32
msgid ""
@@ -3269,17 +3341,14 @@ msgid ""
"literal; `String::new()` creates a new empty string, to which string data "
"can be added using the `push()` and `push_str()` methods."
msgstr ""
-"和其他类型一样,`String::from()` 会从字符串字面量创建一个字符串;`String::"
-"new()` 会创建一个新的空字符串, 之后可以使用 `push()` 和 `push_str()` 方法"
-"向其中添加字符串数据。"
+"和其他类型一样,`String::from()` 会从字符串字面量创建一个字符串;`String::new()` 会创建一个新的空字符串, "
+"之后可以使用 `push()` 和 `push_str()` 方法向其中添加字符串数据。"
#: src/basic-syntax/string-slices.md:35
msgid ""
"The `format!()` macro is a convenient way to generate an owned string from "
"dynamic values. It accepts the same format specification as `println!()`."
-msgstr ""
-"`format!()` 宏可以方便地动态生成拥有所有权的字符串。它接受和 `println!()` 相"
-"同的格式规范。"
+msgstr "`format!()` 宏可以方便地动态生成拥有所有权的字符串。它接受和 `println!()` 相同的格式规范。"
#: src/basic-syntax/string-slices.md:38
msgid ""
@@ -3294,25 +3363,21 @@ msgid ""
"equivalent of `std::string` from C++ (main difference: it can only contain "
"UTF-8 encoded bytes and will never use a small-string optimization)."
msgstr ""
-"对于 C++ 程序员:可以把 `&str` 当作 C++ 中的 `const char*`,但是它总是指向内"
-"存中的一个有效字符串。 Rust 的 `String` 大致相当于 C++ 中 `std::string` "
-"(主要区别:它只能包含 UTF-8 编码的字节, 并且永远不会使用小字符串优化"
-"(small-string optimization))。"
+"对于 C++ 程序员:可以把 `&str` 当作 C++ 中的 `const char*`,但是它总是指向内存中的一个有效字符串。 Rust 的 "
+"`String` 大致相当于 C++ 中 `std::string` (主要区别:它只能包含 UTF-8 编码的字节, "
+"并且永远不会使用小字符串优化(small-string optimization))。"
#: src/basic-syntax/functions.md:3
msgid ""
-"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/"
-"Fizz_buzz) interview question:"
-msgstr ""
-"一个 Rust 版本的著名 [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) 面试"
-"题:"
+"A Rust version of the famous "
+"[FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) interview question:"
+msgstr "一个 Rust 版本的著名 [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) 面试题:"
#: src/basic-syntax/functions.md:36
msgid ""
"We refer in `main` to a function written below. Neither forward declarations "
"nor headers are necessary. "
-msgstr ""
-"我们在 `main` 中引用了下面编写的一个函数。不需要提前声明或添加头文件。 "
+msgstr "我们在 `main` 中引用了下面编写的一个函数。不需要提前声明或添加头文件。 "
#: src/basic-syntax/functions.md:37
msgid ""
@@ -3324,29 +3389,22 @@ msgstr "类型跟随在声明的参数后(与某些编程语言相反),然
msgid ""
"The last expression in a function body (or any block) becomes the return "
"value. Simply omit the `;` at the end of the expression."
-msgstr ""
-"函数体(或任何块)中的最后一个表达式将成为返回值。只需省略表达式末尾的 `;` 即"
-"可。"
+msgstr "函数体(或任何块)中的最后一个表达式将成为返回值。只需省略表达式末尾的 `;` 即可。"
#: src/basic-syntax/functions.md:39
msgid ""
"Some functions have no return value, and return the 'unit type', `()`. The "
"compiler will infer this if the `-> ()` return type is omitted."
-msgstr ""
-"有些函数没有返回值,会返回“单元类型(unit type)”`()`。如果省略了`-> ()`的返"
-"回类型,编译器将会自动推断。"
+msgstr "有些函数没有返回值,会返回“单元类型(unit type)”`()`。如果省略了`-> ()`的返回类型,编译器将会自动推断。"
#: src/basic-syntax/functions.md:40
msgid ""
"The range expression in the `for` loop in `print_fizzbuzz_to()` contains "
"`=n`, which causes it to include the upper bound."
-msgstr ""
-"`print_fizzbuzz_to()`函数中`for`循环的范围表达式(range expression)包含"
-"`=n`,这会导致它包括上限。"
+msgstr "`print_fizzbuzz_to()`函数中`for`循环的范围表达式(range expression)包含`=n`,这会导致它包括上限。"
#: src/basic-syntax/rustdoc.md:3
-msgid ""
-"All language items in Rust can be documented using special `///` syntax."
+msgid "All language items in Rust can be documented using special `///` syntax."
msgstr "Rust 中的所有语言元素都可以通过特殊的 `///` 语法进行文档化。"
#: src/basic-syntax/rustdoc.md:5
@@ -3387,31 +3445,26 @@ msgstr ""
#, fuzzy
msgid ""
"The contents are treated as Markdown. All published Rust library crates are "
-"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]"
-"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is "
-"idiomatic to document all public items in an API using this pattern. Code "
+"automatically documented at [`docs.rs`](https://docs.rs) using the "
+"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It "
+"is idiomatic to document all public items in an API using this pattern. Code "
"snippets can document usage and will be used as unit tests."
msgstr ""
-"文档的内容会被当做 Markdown 处理。所有已发布 Rust 库 crate 都会自动被"
-"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) 工具在 "
-"[`docs.rs`](https://docs.rs)存档。 按照这种方式来为 API 中的所有公开项编写文"
-"档是 Rust 中惯用的做法。"
+"文档的内容会被当做 Markdown 处理。所有已发布 Rust 库 crate "
+"都会自动被[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) 工具在 "
+"[`docs.rs`](https://docs.rs)存档。 按照这种方式来为 API 中的所有公开项编写文档是 Rust 中惯用的做法。"
#: src/basic-syntax/rustdoc.md:30
msgid ""
-"Show students the generated docs for the `rand` crate at [`docs.rs/rand`]"
-"(https://docs.rs/rand)."
-msgstr ""
-"向学生展示在 [`docs.rs/rand`](https://docs.rs/rand) 中为 `rand` crate 生成的"
-"文档。"
+"Show students the generated docs for the `rand` crate at "
+"[`docs.rs/rand`](https://docs.rs/rand)."
+msgstr "向学生展示在 [`docs.rs/rand`](https://docs.rs/rand) 中为 `rand` crate 生成的文档。"
#: src/basic-syntax/rustdoc.md:33
msgid ""
"This course does not include rustdoc on slides, just to save space, but in "
"real code they should be present."
-msgstr ""
-"本课程的幻灯片中不包含 rustdoc,这是为了节省空间,但是在实际的代码中,应当编"
-"写相关的程序文档。"
+msgstr "本课程的幻灯片中不包含 rustdoc,这是为了节省空间,但是在实际的代码中,应当编写相关的程序文档。"
#: src/basic-syntax/rustdoc.md:36
msgid ""
@@ -3422,16 +3475,17 @@ msgstr "内部文档注释将在稍后(在讲解模块的页面)讨论,这
#: src/basic-syntax/rustdoc.md:39
msgid ""
"Rustdoc comments can contain code snippets that we can run and test using "
-"`cargo test`. We will discuss these tests in the [Testing section](../"
-"testing/doc-tests.html)."
+"`cargo test`. We will discuss these tests in the [Testing "
+"section](../testing/doc-tests.html)."
msgstr ""
+"Rustdoc 注释可以包含我们可使用“cargo "
+"test”运行和测试的代码段。我们将在[“测试”部分](../testing/doc-tests.html)中讨论这些测试。"
#: src/basic-syntax/methods.md:3
msgid ""
"Methods are functions associated with a type. The `self` argument of a "
"method is an instance of the type it is associated with:"
-msgstr ""
-"方法是与某种类型关联的函数。方法的 `self` 参数是与其关联类型的一个实例:"
+msgstr "方法是与某种类型关联的函数。方法的 `self` 参数是与其关联类型的一个实例:"
#: src/basic-syntax/methods.md:6
msgid ""
@@ -3478,15 +3532,16 @@ msgid ""
"constructor, `Rectangle { width, height }`, could be called directly. See "
"the [Rustnomicon](https://doc.rust-lang.org/nomicon/constructors.html)."
msgstr ""
+"虽然从技术层面来讲,Rust 没有自定义构造函数,但静态方法通常用于初始化结构体(但并非必须这样做)。您可以直接调用实际构造函数“Rectangle { "
+"width, height }”。请参阅 [Rust "
+"秘典](https://doc.rust-lang.org/nomicon/constructors.html)。"
#: src/basic-syntax/methods.md:45
#, fuzzy
msgid ""
"Add a `Rectangle::square(width: u32)` constructor to illustrate that such "
"static methods can take arbitrary parameters."
-msgstr ""
-"新增一个 `Rectangle::new_square(width: u32)` 构造函数来说明构造函数可以接受任"
-"意参数。"
+msgstr "新增一个 `Rectangle::new_square(width: u32)` 构造函数来说明构造函数可以接受任意参数。"
#: src/basic-syntax/functions-interlude.md:1
msgid "Function Overloading"
@@ -3553,9 +3608,7 @@ msgid ""
"When using generics, the standard library's `Into` can provide a kind of "
"limited polymorphism on argument types. We will see more details in a later "
"section."
-msgstr ""
-"标准库中的 `Into` 通过泛型参数提供了一种具有有限多态性的参数类型。详见之后"
-"的章节。"
+msgstr "标准库中的 `Into` 通过泛型参数提供了一种具有有限多态性的参数类型。详见之后的章节。"
#: src/exercises/day-1/morning.md:1
msgid "Day 1: Morning Exercises"
@@ -3579,12 +3632,10 @@ msgstr "在解题时要考虑几件事:"
#: src/exercises/day-1/morning.md:13
msgid ""
-"Use a local Rust installation, if possible. This way you can get auto-"
-"completion in your editor. See the page about [Using Cargo](../../cargo.md) "
-"for details on installing Rust."
-msgstr ""
-"最好使用本地安装的 Rust,以实现在编辑器中自动补全。关于安装 Rust 的细节,请参"
-"见 \\[使用 Cargo\\] 页面。"
+"Use a local Rust installation, if possible. This way you can get "
+"auto-completion in your editor. See the page about [Using "
+"Cargo](../../cargo.md) for details on installing Rust."
+msgstr "最好使用本地安装的 Rust,以实现在编辑器中自动补全。关于安装 Rust 的细节,请参见 \\[使用 Cargo\\] 页面。"
#: src/exercises/day-1/morning.md:17
msgid "Alternatively, use the Rust Playground."
@@ -3594,63 +3645,63 @@ msgstr "也可以使用 Rust Playground 作为替代。"
msgid ""
"The code snippets are not editable on purpose: the inline code snippets lose "
"their state if you navigate away from the page."
-msgstr ""
-"页面内嵌的代码片段是不可编辑的:因为离开页面后内嵌代码片段中的修改会丢失。"
+msgstr "页面内嵌的代码片段是不可编辑的:因为离开页面后内嵌代码片段中的修改会丢失。"
-#: src/exercises/day-1/morning.md:22 src/exercises/day-2/morning.md:11
-#: src/exercises/day-3/morning.md:9 src/exercises/bare-metal/morning.md:7
+#: src/exercises/day-1/morning.md:22
+#: src/exercises/day-2/morning.md:11
+#: src/exercises/day-3/morning.md:9
+#: src/exercises/bare-metal/morning.md:7
#: src/exercises/concurrency/morning.md:12
#, fuzzy
msgid ""
-"After looking at the exercises, you can look at the [solutions](solutions-"
-"morning.md) provided."
+"After looking at the exercises, you can look at the "
+"[solutions](solutions-morning.md) provided."
msgstr "读完习题后,可以阅读本书提供的 \\[题解\\]。"
#: src/exercises/day-1/implicit-conversions.md:3
msgid ""
"Rust will not automatically apply _implicit conversions_ between types "
-"([unlike C++](https://en.cppreference.com/w/cpp/language/"
-"implicit_conversion)). You can see this in a program like this:"
+"([unlike "
+"C++](https://en.cppreference.com/w/cpp/language/implicit_conversion)). You "
+"can see this in a program like this:"
msgstr ""
-"[与 C++ 不同](https://en.cppreference.com/w/cpp/language/"
-"implicit_conversion),Rust 不会自动进行 _隐式类型转换_。例如,下面的程序中不"
-"存在隐式类型转换:"
+"[与 C++ "
+"不同](https://en.cppreference.com/w/cpp/language/implicit_conversion),Rust "
+"不会自动进行 _隐式类型转换_。例如,下面的程序中不存在隐式类型转换:"
#: src/exercises/day-1/implicit-conversions.md:20
msgid ""
-"The Rust integer types all implement the [`From`](https://doc.rust-lang."
-"org/std/convert/trait.From.html) and [`Into`](https://doc.rust-lang.org/"
-"std/convert/trait.Into.html) traits to let us convert between them. The "
-"`From` trait has a single `from()` method and similarly, the `Into` "
-"trait has a single `into()` method. Implementing these traits is how a type "
-"expresses that it can be converted into another type."
+"The Rust integer types all implement the "
+"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and "
+"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) traits to "
+"let us convert between them. The `From` trait has a single `from()` "
+"method and similarly, the `Into` trait has a single `into()` method. "
+"Implementing these traits is how a type expresses that it can be converted "
+"into another type."
msgstr ""
-"Rust 的整数类型都实现了 [`From`](https://doc.rust-lang.org/std/convert/"
-"trait.From.html) 和 [`Into`](https://doc.rust-lang.org/std/convert/trait."
-"Into.html) trait,使得我们可以在它们之间进行转换。`From` trait 包含 "
-"`from()` 方法,`Into` trait 包含 `into()` 方法。类型通过实现这些 trait 来"
-"表达它将被如何转换为另一个类型。"
+"Rust 的整数类型都实现了 "
+"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) 和 "
+"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) "
+"trait,使得我们可以在它们之间进行转换。`From` trait 包含 `from()` 方法,`Into` trait 包含 "
+"`into()` 方法。类型通过实现这些 trait 来表达它将被如何转换为另一个类型。"
#: src/exercises/day-1/implicit-conversions.md:26
msgid ""
"The standard library has an implementation of `From for i16`, which "
-"means that we can convert a variable `x` of type `i8` to an `i16` by "
-"calling `i16::from(x)`. Or, simpler, with `x.into()`, because `From for "
-"i16` implementation automatically create an implementation of `Into for "
-"i8`."
+"means that we can convert a variable `x` of type `i8` to an `i16` by calling "
+" `i16::from(x)`. Or, simpler, with `x.into()`, because `From for i16` "
+"implementation automatically create an implementation of `Into for i8`."
msgstr ""
-"标准库中包含 `From for i16` 的实现,即我们可以通过调用 `i16::from(x)` 来"
-"将 `i8` 类型的变量 `x` 转换为 `i16`。或者也可以简单地使用 `x.into()`,因为 "
-"`From for i16` 的实现会自动创建 `Into for i8` 的实现。"
+"标准库中包含 `From for i16` 的实现,即我们可以通过调用 `i16::from(x)` 来将 `i8` 类型的变量 `x` 转换为 "
+"`i16`。或者也可以简单地使用 `x.into()`,因为 `From for i16` 的实现会自动创建 `Into for "
+"i8` 的实现。"
#: src/exercises/day-1/implicit-conversions.md:31
msgid ""
"The same applies for your own `From` implementations for your own types, so "
"it is sufficient to only implement `From` to get a respective `Into` "
"implementation automatically."
-msgstr ""
-"这同样也适用于自定义类型的 `From` 实现,只需实现 `From` 就可以自动得到对应的 "
-"`Into` 实现。"
+msgstr "这同样也适用于自定义类型的 `From` 实现,只需实现 `From` 就可以自动得到对应的 `Into` 实现。"
#: src/exercises/day-1/implicit-conversions.md:34
msgid "Execute the above program and look at the compiler error."
@@ -3665,13 +3716,14 @@ msgid ""
"Change the types of `x` and `y` to other things (such as `f32`, `bool`, "
"`i128`) to see which types you can convert to which other types. Try "
"converting small types to big types and the other way around. Check the "
-"[standard library documentation](https://doc.rust-lang.org/std/convert/trait."
-"From.html) to see if `From` is implemented for the pairs you check."
+"[standard library "
+"documentation](https://doc.rust-lang.org/std/convert/trait.From.html) to see "
+"if `From` is implemented for the pairs you check."
msgstr ""
-"修改 `x` 和 `y` 的类型(例如 `f32`, `bool`, `i128` 等)来了解哪些类型之间可以"
-"相互转换。尝试将较小的类型转换为较大的类型和将较大的类型转换为较小的类型。阅"
-"读 [标准库文档](https://doc.rust-lang.org/std/convert/trait.From.html) 来了解"
-"对于你所尝试的两个类型 `From` 是否已被实现。"
+"修改 `x` 和 `y` 的类型(例如 `f32`, `bool`, `i128` "
+"等)来了解哪些类型之间可以相互转换。尝试将较小的类型转换为较大的类型和将较大的类型转换为较小的类型。阅读 "
+"[标准库文档](https://doc.rust-lang.org/std/convert/trait.From.html) "
+"来了解对于你所尝试的两个类型 `From` 是否已被实现。"
#: src/exercises/day-1/for-loops.md:1
#: src/exercises/day-1/solutions-morning.md:3
@@ -3684,8 +3736,8 @@ msgstr "我们可以这样声明一个数组:"
#: src/exercises/day-1/for-loops.md:9
msgid ""
-"You can print such an array by asking for its debug representation with `{:?}"
-"`:"
+"You can print such an array by asking for its debug representation with "
+"`{:?}`:"
msgstr "你可以使用 `{:?}` 来打印这种数组的调试格式:"
#: src/exercises/day-1/for-loops.md:19
@@ -3737,8 +3789,7 @@ msgid ""
"and a function `transpose` which will transpose a matrix (turn rows into "
"columns):"
msgstr ""
-"使用以上知识,写一个用易读的格式输出矩阵的 `pretty_print` 函数,以及一个对矩"
-"阵进行转置(将行和列互换)的 `transpose` 函数:"
+"使用以上知识,写一个用易读的格式输出矩阵的 `pretty_print` 函数,以及一个对矩阵进行转置(将行和列互换)的 `transpose` 函数:"
#: src/exercises/day-1/for-loops.md:49
msgid "Hard-code both functions to operate on 3 × 3 matrices."
@@ -3818,47 +3869,45 @@ msgid ""
"argument and return types? Something like `&[&[i32]]` for a two-dimensional "
"slice-of-slices. Why or why not?"
msgstr ""
-"是否可以使用 `&[i32]` 切片而不是硬编码的 3 × 3 矩阵作为函数的参数和返回类型?"
-"例如使用 `&[&[i32]]` 表示一个二维的切片的切片。为什么这样做是可行或不可行的?"
+"是否可以使用 `&[i32]` 切片而不是硬编码的 3 × 3 矩阵作为函数的参数和返回类型?例如使用 `&[&[i32]]` "
+"表示一个二维的切片的切片。为什么这样做是可行或不可行的?"
#: src/exercises/day-1/for-loops.md:89
msgid ""
"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production quality "
"implementation."
-msgstr ""
-"参考 [`ndarray` crate](https://docs.rs/ndarray/) 以了解该功能满足生产环境质量"
-"的实现。"
+msgstr "参考 [`ndarray` crate](https://docs.rs/ndarray/) 以了解该功能满足生产环境质量的实现。"
#: src/exercises/day-1/for-loops.md:94
msgid ""
"The solution and the answer to the bonus section are available in the "
"[Solution](solutions-morning.md#arrays-and-for-loops) section."
-msgstr ""
-"题目解答和附加题的答案在 [题解](solutions-morning.md#arrays-and-for-loops) 章"
-"节中。"
+msgstr "题目解答和附加题的答案在 [题解](solutions-morning.md#arrays-and-for-loops) 章节中。"
#: src/exercises/day-1/for-loops.md:97
msgid ""
"The use of the reference `&array` within `for n in &array` is a subtle "
"preview of issues of ownership that will come later in the afternoon."
-msgstr ""
+msgstr "在“for n in &array”中使用引用“&array”这一做法巧妙地预先展示了下午将谈到的所有权问题。"
#: src/exercises/day-1/for-loops.md:100
msgid "Without the `&`..."
-msgstr ""
+msgstr "如果不使用“&”…"
#: src/exercises/day-1/for-loops.md:101
msgid ""
"The loop would have been one that consumes the array. This is a change "
-"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/"
-"rust-2021/IntoIterator-for-arrays.html)."
+"[introduced in the 2021 "
+"Edition](https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html)."
msgstr ""
+"循环将会是一个使用数组的循环。这是一项[在 2021 "
+"年版中引入](https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html)的变更。"
#: src/exercises/day-1/for-loops.md:104
msgid ""
"An implicit array copy would have occurred. Since `i32` is a copy type, "
"then `[i32; 3]` is also a copy type."
-msgstr ""
+msgstr "会发生隐式数组复制。由于“i32”是复制类型,因此“\\[i32; 3\\]”也是复制类型。"
#: src/control-flow.md:3
msgid ""
@@ -3867,9 +3916,8 @@ msgid ""
"becomes the value of the `if` expression. Other control flow expressions "
"work similarly in Rust."
msgstr ""
-"正如我们所知,`if` 是 Rust 中的一个表达式。它用于有条件地 评估两个块中的一"
-"个,但这些块可以有一个值, 然后成为 `if` 表达式的值。其他控制流表达式在 Rust "
-"中也有类似 的运作方式。"
+"正如我们所知,`if` 是 Rust 中的一个表达式。它用于有条件地 评估两个块中的一个,但这些块可以有一个值, 然后成为 `if` "
+"表达式的值。其他控制流表达式在 Rust 中也有类似 的运作方式。"
#: src/control-flow/blocks.md:3
#, fuzzy
@@ -3891,9 +3939,14 @@ msgid ""
"return value:"
msgstr "同样的规则也适用于函数:函数主体的值 是返回值:"
-#: src/control-flow/blocks.md:45 src/enums.md:34 src/enums/sizes.md:28
-#: src/pattern-matching.md:25 src/pattern-matching/match-guards.md:22
-#: src/structs.md:31 src/methods.md:30 src/methods/example.md:46
+#: src/control-flow/blocks.md:45
+#: src/enums.md:34
+#: src/enums/sizes.md:28
+#: src/pattern-matching.md:25
+#: src/pattern-matching/match-guards.md:22
+#: src/structs.md:31
+#: src/methods.md:30
+#: src/methods/example.md:46
msgid "Key Points:"
msgstr "关键点:"
@@ -3907,9 +3960,7 @@ msgstr "这张幻灯片的重点是说明在 Rust 中,块有类型和值。"
msgid ""
"You can show how the value of the block changes by changing the last line in "
"the block. For instance, adding/removing a semicolon or using a `return`."
-msgstr ""
-"你可以通过更改块的最后一行,来展示块值的变化情况。例如,添加/移除分号或使用 "
-"`return`。"
+msgstr "你可以通过更改块的最后一行,来展示块值的变化情况。例如,添加/移除分号或使用 `return`。"
#: src/control-flow/if-expressions.md:1
msgid "`if` expressions"
@@ -3917,19 +3968,19 @@ msgstr "`if` 表达式"
#: src/control-flow/if-expressions.md:3
msgid ""
-"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/"
-"if-expr.html#if-expressions) exactly like `if` statements in other languages:"
+"You use [`if` "
+"expressions](https://doc.rust-lang.org/reference/expressions/if-expr.html#if-expressions) "
+"exactly like `if` statements in other languages:"
msgstr ""
-"[`if` 表达式](https://doc.rust-lang.org/reference/expressions/if-expr."
-"html#if-expressions) 的用法与其他语言中的 `if` 语句完全一样。"
+"[`if` "
+"表达式](https://doc.rust-lang.org/reference/expressions/if-expr.html#if-expressions) "
+"的用法与其他语言中的 `if` 语句完全一样。"
#: src/control-flow/if-expressions.md:18
msgid ""
"In addition, you can use `if` as an expression. The last expression of each "
"block becomes the value of the `if` expression:"
-msgstr ""
-"此外,你还可以将 `if` 用作一个表达式。每个块的最后一个表达式 将成为 `if` 表达"
-"式的值:"
+msgstr "此外,你还可以将 `if` 用作一个表达式。每个块的最后一个表达式 将成为 `if` 表达式的值:"
#: src/control-flow/if-expressions.md:35
msgid ""
@@ -3937,8 +3988,8 @@ msgid ""
"branch blocks must have the same type. Consider showing what happens if you "
"add `;` after `x / 2` in the second example."
msgstr ""
-"由于 `if` 是一个表达式且必须有一个特定的类型,因此它的两个分支块必须有相同的"
-"类型。考虑在第二个示例中将 `;` 添加到 `x / 2` 的后面,看看会出现什么情况。"
+"由于 `if` 是一个表达式且必须有一个特定的类型,因此它的两个分支块必须有相同的类型。考虑在第二个示例中将 `;` 添加到 `x / 2` "
+"的后面,看看会出现什么情况。"
#: src/control-flow/for-expressions.md:1
msgid "`for` loops"
@@ -3952,8 +4003,7 @@ msgid ""
"automatically call `into_iter()` on the expression and then iterate over it:"
msgstr ""
"[`for` 循环](https://doc.rust-lang.org/std/keyword.for.html) 与 [`when let` "
-"循环](when-let-expression.md)密切相关。它会 自动对表达式调用 `into_iter()`,"
-"然后对其进行迭代:"
+"循环](when-let-expression.md)密切相关。它会 自动对表达式调用 `into_iter()`,然后对其进行迭代:"
#: src/control-flow/for-expressions.md:22
msgid "You can use `break` and `continue` here as usual."
@@ -3977,9 +4027,7 @@ msgstr "`step_by` 是返回另一个 `Iterator` 的方法,用于逐一跳过
msgid ""
"Modify the elements in the vector and explain the compiler errors. Change "
"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`."
-msgstr ""
-"修改矢量中的元素并说明编译器错误。将矢量 `v` 改为可变,并将 for 循环改为 "
-"`for x in v.iter_mut()`。"
+msgstr "修改矢量中的元素并说明编译器错误。将矢量 `v` 改为可变,并将 for 循环改为 `for x in v.iter_mut()`。"
#: src/control-flow/while-expressions.md:1
msgid "`while` loops"
@@ -3987,11 +4035,13 @@ msgstr "`while` 循环"
#: src/control-flow/while-expressions.md:3
msgid ""
-"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-"
-"expr.html#predicate-loops) works very similar to other languages:"
+"The [`while` "
+"keyword](https://doc.rust-lang.org/reference/expressions/loop-expr.html#predicate-loops) "
+"works very similar to other languages:"
msgstr ""
-"[`while` 关键字](https://doc.rust-lang.org/reference/expressions/loop-expr."
-"html#predicate-loops) 的工作方式与其他语言非常相似:"
+"[`while` "
+"关键字](https://doc.rust-lang.org/reference/expressions/loop-expr.html#predicate-loops) "
+"的工作方式与其他语言非常相似:"
#: src/control-flow/break-continue.md:1
msgid "`break` and `continue`"
@@ -3999,19 +4049,19 @@ msgstr "`break` 和 `continue`"
#: src/control-flow/break-continue.md:3
msgid ""
-"If you want to exit a loop early, use [`break`](https://doc.rust-lang.org/"
-"reference/expressions/loop-expr.html#break-expressions),"
+"If you want to exit a loop early, use "
+"[`break`](https://doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions),"
msgstr ""
-"如果你想提前退出循环,请使用 [`break`](https://doc.rust-lang.org/reference/"
-"expressions/loop-expr.html#break-expressions),"
+"如果你想提前退出循环,请使用 "
+"[`break`](https://doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions),"
#: src/control-flow/break-continue.md:4
msgid ""
-"If you want to immediately start the next iteration use [`continue`](https://"
-"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions)."
+"If you want to immediately start the next iteration use "
+"[`continue`](https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions)."
msgstr ""
-"如果需要立即启动 下一次迭代,请使用 [`continue`](https://doc.rust-lang.org/"
-"reference/expressions/loop-expr.html#continue-expressions)。"
+"如果需要立即启动 下一次迭代,请使用 "
+"[`continue`](https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions)。"
#: src/control-flow/break-continue.md:7
msgid ""
@@ -4030,11 +4080,13 @@ msgstr "`loop` 表达式"
#: src/control-flow/loop-expressions.md:3
msgid ""
-"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/"
-"expressions/loop-expr.html#infinite-loops) which creates an endless loop."
+"Finally, there is a [`loop` "
+"keyword](https://doc.rust-lang.org/reference/expressions/loop-expr.html#infinite-loops) "
+"which creates an endless loop."
msgstr ""
-"最后是用于创建无限循环的 [`loop` 关键字](https://doc.rust-lang.org/reference/"
-"expressions/loop-expr.html#infinite-loops) 。"
+"最后是用于创建无限循环的 [`loop` "
+"关键字](https://doc.rust-lang.org/reference/expressions/loop-expr.html#infinite-loops) "
+"。"
#: src/control-flow/loop-expressions.md:6
msgid "Here you must either `break` or `return` to stop the loop:"
@@ -4049,9 +4101,7 @@ msgid ""
"Note that `loop` is the only looping construct which returns a non-trivial "
"value. This is because it's guaranteed to be entered at least once (unlike "
"`while` and `for` loops)."
-msgstr ""
-"请注意,`loop` 是唯一返回有意义的值的循环结构。 这是因为它保证至少被输入一次"
-"(与 `while` 和 `for` 循环不同)。"
+msgstr "请注意,`loop` 是唯一返回有意义的值的循环结构。 这是因为它保证至少被输入一次(与 `while` 和 `for` 循环不同)。"
#: src/basic-syntax/variables.md:3
msgid ""
@@ -4063,8 +4113,7 @@ msgstr "Rust 通过静态类型实现了类型安全。变量绑定默认是不
msgid ""
"Due to type inference the `i32` is optional. We will gradually show the "
"types less and less as the course progresses."
-msgstr ""
-"由于类型推导,`i32` 可以省略。随着课程推进,我们会越来越少地看到类型声明。"
+msgstr "由于类型推导,`i32` 可以省略。随着课程推进,我们会越来越少地看到类型声明。"
#: src/basic-syntax/type-inference.md:3
msgid "Rust will look at how the variable is _used_ to determine the type:"
@@ -4084,9 +4133,7 @@ msgid ""
"of a type. The compiler does the job for us and helps us write more concise "
"code."
msgstr ""
-"需要重点强调的是这样声明的变量并非像那种动态类型语言中可以持有任何数据的“任何"
-"类型”。这种声明所生成的机器码与明确类型声明完全相同。编译器进行类型推导能够让"
-"我们编写更简略的代码。"
+"需要重点强调的是这样声明的变量并非像那种动态类型语言中可以持有任何数据的“任何类型”。这种声明所生成的机器码与明确类型声明完全相同。编译器进行类型推导能够让我们编写更简略的代码。"
#: src/basic-syntax/type-inference.md:33
#, fuzzy
@@ -4094,22 +4141,21 @@ msgid ""
"The following code tells the compiler to copy into a certain generic "
"container without the code ever explicitly specifying the contained type, "
"using `_` as a placeholder:"
-msgstr ""
-"下面的代码通过使用 `_` 占位符来告诉编译器无需明确指定其类型就可以将对应数据拷"
-"贝到该容器: "
+msgstr "下面的代码通过使用 `_` 占位符来告诉编译器无需明确指定其类型就可以将对应数据拷贝到该容器: "
#: src/basic-syntax/type-inference.md:48
#, fuzzy
msgid ""
-"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator."
-"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/"
-"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-lang."
-"org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-"
-"HashSet%3CT,+S%3E) implements."
+"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.collect) "
+"relies on "
+"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html), "
+"which "
+"[`HashSet`](https://doc.rust-lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-HashSet%3CT,+S%3E) "
+"implements."
msgstr ""
-"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator."
-"html#method.collect) 依赖 [`HashSet`](https://doc.rust-lang.org/std/iter/"
-"trait.FromIterator.html) 实现的 `FromIterator`。"
+"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.collect) "
+"依赖 [`HashSet`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) "
+"实现的 `FromIterator`。"
#: src/basic-syntax/static-and-const.md:1
msgid "Static and Constant Variables"
@@ -4117,10 +4163,10 @@ msgstr "静态 (Static) 变量和常数 (Constant) 变量"
#: src/basic-syntax/static-and-const.md:3
msgid ""
-"Static and constant variables are two different ways to create globally-"
-"scoped values that cannot be moved or reallocated during the execution of "
-"the program. "
-msgstr ""
+"Static and constant variables are two different ways to create "
+"globally-scoped values that cannot be moved or reallocated during the "
+"execution of the program. "
+msgstr "静态变量和常量变量是创建全局范围值的两种不同方法,这类值在程序执行期间无法移动或重新分配。"
#: src/basic-syntax/static-and-const.md:6
msgid "`const`"
@@ -4130,21 +4176,23 @@ msgstr "`const`"
msgid ""
"Constant variables are evaluated at compile time and their values are "
"inlined wherever they are used:"
-msgstr ""
+msgstr "系统会在编译时对常量变量进行求值;无论在何处使用,其值都会被内嵌:"
#: src/basic-syntax/static-and-const.md:30
msgid ""
-"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-"
-"vs-static.html) these are inlined upon use."
+"According to the [Rust RFC "
+"Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) these are "
+"inlined upon use."
msgstr ""
-"根据 [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static."
-"html) 这些变量在使用时是内联 (inlined) 的。"
+"根据 [Rust RFC "
+"Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) "
+"这些变量在使用时是内联 (inlined) 的。"
#: src/basic-syntax/static-and-const.md:32
msgid ""
"Only functions marked `const` can be called at compile time to generate "
"`const` values. `const` functions can however be called at runtime."
-msgstr ""
+msgstr "在编译时只能调用标记为“const”的函数以生成“const”值。不过,可在运行时调用“const”函数。"
#: src/basic-syntax/static-and-const.md:34
msgid "`static`"
@@ -4154,7 +4202,7 @@ msgstr "`static`"
msgid ""
"Static variables will live during the whole execution of the program, and "
"therefore will not move:"
-msgstr ""
+msgstr "静态变量在程序的整个执行过程中始终有效,因此不会移动:"
#: src/basic-syntax/static-and-const.md:38
msgid ""
@@ -4177,26 +4225,29 @@ msgstr ""
#: src/basic-syntax/static-and-const.md:46
#, fuzzy
msgid ""
-"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-"
-"vs-static.html), these are not inlined upon use and have an actual "
-"associated memory location. This is useful for unsafe and embedded code, "
-"and the variable lives through the entirety of the program execution. When a "
-"globally-scoped value does not have a reason to need object identity, "
-"`const` is generally preferred."
+"As noted in the [Rust RFC "
+"Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html), these are "
+"not inlined upon use and have an actual associated memory location. This is "
+"useful for unsafe and embedded code, and the variable lives through the "
+"entirety of the program execution. When a globally-scoped value does not "
+"have a reason to need object identity, `const` is generally preferred."
msgstr ""
-"正如 [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static."
-"html) 中所述,这些变量在使用时并不是内联的,而且还具有实际相关联的内存位置。"
-"这对于不安全的嵌入式代码是有用的,并且这些变量存在于整个程序的执行过程之中。"
+"正如 [Rust RFC "
+"Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) "
+"中所述,这些变量在使用时并不是内联的,而且还具有实际相关联的内存位置。这对于不安全的嵌入式代码是有用的,并且这些变量存在于整个程序的执行过程之中。"
#: src/basic-syntax/static-and-const.md:50
msgid ""
"Because `static` variables are accessible from any thread, they must be "
-"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-"
-"lang.org/std/sync/struct.Mutex.html), atomic or similar. It is also possible "
-"to have mutable statics, but they require manual synchronisation so any "
-"access to them requires `unsafe` code. We will look at [mutable statics](../"
-"unsafe/mutable-static-variables.md) in the chapter on Unsafe Rust."
+"`Sync`. Interior mutability is possible through a "
+"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html), atomic or "
+"similar. It is also possible to have mutable statics, but they require "
+"manual synchronisation so any access to them requires `unsafe` code. We will "
+"look at [mutable statics](../unsafe/mutable-static-variables.md) in the "
+"chapter on Unsafe Rust."
msgstr ""
+"由于“static”变量可从任何线程访问,因此它们必须是“Sync”。内部可变性可通过[“互斥量”](https://doc.rust-lang.org/std/sync/struct.Mutex.html)、原子性或类似对象实现。也可能具有可变静态项,但它们需要手动同步,因此对它们的任何访问都需要“unsafe”代码。我们将在“不安全 "
+"Rust”章节中探讨[可变静态项](../unsafe/mutable-static-variables.md)。"
#: src/basic-syntax/static-and-const.md:58
msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`."
@@ -4209,30 +4260,32 @@ msgid ""
msgstr "另一方面,`static` 远远更类似于C++中的 `const` 或可改变的全局变量。"
#: src/basic-syntax/static-and-const.md:60
+#, fuzzy
msgid ""
"`static` provides object identity: an address in memory and state as "
"required by types with interior mutability such as `Mutex`."
msgstr ""
+"“static”提供对象标识:内存中的一个地址及具有内部可变性的类型(如“Mutex\n"
+"\n"
+"”)所需的状态。"
#: src/basic-syntax/static-and-const.md:61
msgid ""
"It isn't super common that one would need a runtime evaluated constant, but "
"it is helpful and safer than using a static."
-msgstr ""
-"虽然需要使用在运行中求值的常量的情况并不是很常见,但是它是有帮助的,而且比使"
-"用静态变量更安全。"
+msgstr "虽然需要使用在运行中求值的常量的情况并不是很常见,但是它是有帮助的,而且比使用静态变量更安全。"
#: src/basic-syntax/static-and-const.md:62
msgid "`thread_local` data can be created with the macro `std::thread_local`."
-msgstr ""
+msgstr "可以使用宏“std::thread_local”创建“thread_local”数据。"
#: src/basic-syntax/static-and-const.md:64
msgid "Properties table:"
-msgstr ""
+msgstr "属性表:"
#: src/basic-syntax/static-and-const.md:66
msgid "Property"
-msgstr ""
+msgstr "属性"
#: src/basic-syntax/static-and-const.md:66
#, fuzzy
@@ -4241,22 +4294,22 @@ msgstr "`static`"
#: src/basic-syntax/static-and-const.md:66
msgid "Constant"
-msgstr ""
+msgstr "常量"
#: src/basic-syntax/static-and-const.md:68
msgid "Has an address in memory"
-msgstr ""
+msgstr "在内存中有地址"
#: src/basic-syntax/static-and-const.md:68
#: src/basic-syntax/static-and-const.md:69
#: src/basic-syntax/static-and-const.md:71
#: src/basic-syntax/static-and-const.md:72
msgid "Yes"
-msgstr ""
+msgstr "是"
#: src/basic-syntax/static-and-const.md:68
msgid "No (inlined)"
-msgstr ""
+msgstr "否(内嵌)"
#: src/basic-syntax/static-and-const.md:69
#, fuzzy
@@ -4267,15 +4320,15 @@ msgstr "`main` 函数是程序的入口。"
#: src/basic-syntax/static-and-const.md:70
#: src/basic-syntax/static-and-const.md:72
msgid "No"
-msgstr ""
+msgstr "否"
#: src/basic-syntax/static-and-const.md:70
msgid "Can be mutable"
-msgstr ""
+msgstr "可变"
#: src/basic-syntax/static-and-const.md:70
msgid "Yes (unsafe)"
-msgstr ""
+msgstr "是(不安全)"
#: src/basic-syntax/static-and-const.md:71
#, fuzzy
@@ -4284,11 +4337,11 @@ msgstr "值在编译时具有已知的固定大小。"
#: src/basic-syntax/static-and-const.md:71
msgid "Yes (initialised at compile time)"
-msgstr ""
+msgstr "是(在编译时被初始化)"
#: src/basic-syntax/static-and-const.md:72
msgid "Inlined wherever it is used"
-msgstr ""
+msgstr "内嵌在使用它的任何位置"
#: src/basic-syntax/scopes-shadowing.md:3
msgid ""
@@ -4338,9 +4391,8 @@ msgid ""
"both variable's memory locations exist at the same time. Both are available "
"under the same name, depending where you use it in the code. "
msgstr ""
-"定义: 隐藏和变更 (mutation) 不同,因为在隐藏之后,两个变量都会同时存在于内存"
-"的不同位置中。在同一个名字下的两个变量都是可以被使用的,但是你在代码的哪里使"
-"用会最终决定你使用哪一个变量。"
+"定义: 隐藏和变更 (mutation) "
+"不同,因为在隐藏之后,两个变量都会同时存在于内存的不同位置中。在同一个名字下的两个变量都是可以被使用的,但是你在代码的哪里使用会最终决定你使用哪一个变量。"
#: src/basic-syntax/scopes-shadowing.md:26
msgid "A shadowing variable can have a different type. "
@@ -4357,9 +4409,7 @@ msgid ""
"The following code demonstrates why the compiler can't simply reuse memory "
"locations when shadowing an immutable variable in a scope, even if the type "
"does not change."
-msgstr ""
-"以下代码说明了为什么在作用域内隐藏一个不可变的变量时,即使是在变量类型没有改"
-"变的情况下,编译器也不能简单地重复利用之前的内存位置。"
+msgstr "以下代码说明了为什么在作用域内隐藏一个不可变的变量时,即使是在变量类型没有改变的情况下,编译器也不能简单地重复利用之前的内存位置。"
#: src/enums.md:3
msgid ""
@@ -4405,9 +4455,7 @@ msgstr "枚举允许你从一种类型下收集一组值"
msgid ""
"This page offers an enum type `CoinFlip` with two variants `Heads` and "
"`Tails`. You might note the namespace when using variants."
-msgstr ""
-"本页提供了一个枚举类型 `CoinFlip`,其中包含 `Heads` 和`Tail`两个变体。在使用"
-"变体时,你可能会注意到命名空间。"
+msgstr "本页提供了一个枚举类型 `CoinFlip`,其中包含 `Heads` 和`Tail`两个变体。在使用变体时,你可能会注意到命名空间。"
#: src/enums.md:38
msgid "This might be a good time to compare Structs and Enums:"
@@ -4417,9 +4465,7 @@ msgstr "这可能是比较结构体和枚举的好时机:"
msgid ""
"In both, you can have a simple version without fields (unit struct) or one "
"with different types of fields (variant payloads). "
-msgstr ""
-"在这两者中,你可以获得一个不含字段的简单版本(单位结构体),或一个包含不同类"
-"型字段的版本(变体载荷)。"
+msgstr "在这两者中,你可以获得一个不含字段的简单版本(单位结构体),或一个包含不同类型字段的版本(变体载荷)。"
#: src/enums.md:40
msgid "In both, associated functions are defined within an `impl` block."
@@ -4430,17 +4476,13 @@ msgid ""
"You could even implement the different variants of an enum with separate "
"structs but then they wouldn’t be the same type as they would if they were "
"all defined in an enum. "
-msgstr ""
-"你甚至可以使用单独的结构体实现枚举的不同变体,但这样一来,如果它们都已在枚举"
-"中定义,类型与之前也不一样。"
+msgstr "你甚至可以使用单独的结构体实现枚举的不同变体,但这样一来,如果它们都已在枚举中定义,类型与之前也不一样。"
#: src/enums/variant-payloads.md:3
msgid ""
"You can define richer enums where the variants carry data. You can then use "
"the `match` statement to extract the data from each variant:"
-msgstr ""
-"你可以定义更丰富的枚举,其中变体会携带数据。然后,你可以使用 `match` 语句从每"
-"个变体中提取数据:"
+msgstr "你可以定义更丰富的枚举,其中变体会携带数据。然后,你可以使用 `match` 语句从每个变体中提取数据:"
#: src/enums/variant-payloads.md:6
msgid ""
@@ -4503,9 +4545,7 @@ msgid ""
"The values in the enum variants can only be accessed after being pattern "
"matched. The pattern binds references to the fields in the \"match arm\" "
"after the `=>`."
-msgstr ""
-"枚举变体中的值只有在被模式匹配后,才可访问。模式将引用绑定到 `=>` 之后"
-"的“match 分支”中的字段。"
+msgstr "枚举变体中的值只有在被模式匹配后,才可访问。模式将引用绑定到 `=>` 之后的“match 分支”中的字段。"
#: src/enums/variant-payloads.md:36
msgid ""
@@ -4523,17 +4563,13 @@ msgstr "匹配表达式拥有一个值。值是 match 分支中被执行的最
msgid ""
"Starting from the top we look for what pattern matches the value then run "
"the code following the arrow. Once we find a match, we stop. "
-msgstr ""
-"从顶部开始,查找与该值匹配的模式,然后沿箭头运行代码。一旦找到匹配,我们便会"
-"停止。"
+msgstr "从顶部开始,查找与该值匹配的模式,然后沿箭头运行代码。一旦找到匹配,我们便会停止。"
#: src/enums/variant-payloads.md:39
msgid ""
"Demonstrate what happens when the search is inexhaustive. Note the advantage "
"the Rust compiler provides by confirming when all cases are handled. "
-msgstr ""
-"展示搜索不详尽时会发生的情况。请注意 Rust 编译器的优势,即确认所有情况何时都"
-"得到了处理。"
+msgstr "展示搜索不详尽时会发生的情况。请注意 Rust 编译器的优势,即确认所有情况何时都得到了处理。"
#: src/enums/variant-payloads.md:40
msgid "`match` inspects a hidden discriminant field in the `enum`."
@@ -4541,8 +4577,8 @@ msgstr "`match` 会检查 `enum` 中的隐藏的判别字段。"
#: src/enums/variant-payloads.md:41
msgid ""
-"It is possible to retrieve the discriminant by calling `std::mem::"
-"discriminant()`"
+"It is possible to retrieve the discriminant by calling "
+"`std::mem::discriminant()`"
msgstr "可以通过调用 `std::mem::discriminant()` 来检索判别"
#: src/enums/variant-payloads.md:42
@@ -4553,12 +4589,12 @@ msgstr "这很有用,例如如果为结构体实现 `PartialEq`,比较字段
#: src/enums/variant-payloads.md:43
msgid ""
-"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::"
-"Click(Click)` with a top level `struct Click { ... }`. The inlined version "
-"cannot implement traits, for example."
+"`WebEvent::Click { ... }` is not exactly the same as "
+"`WebEvent::Click(Click)` with a top level `struct Click { ... }`. The "
+"inlined version cannot implement traits, for example."
msgstr ""
-"`WebEvent::Click { ... }` 与含顶层 `struct Click { ... }` 的 `WebEvent::"
-"Click(Click)` 不完全相同。例如,内嵌版本无法实现 trait。"
+"`WebEvent::Click { ... }` 与含顶层 `struct Click { ... }` 的 "
+"`WebEvent::Click(Click)` 不完全相同。例如,内嵌版本无法实现 trait。"
#: src/enums/sizes.md:3
msgid ""
@@ -4610,10 +4646,9 @@ msgstr ""
#: src/enums/sizes.md:24
msgid ""
-"See the [Rust Reference](https://doc.rust-lang.org/reference/type-layout."
-"html)."
-msgstr ""
-"请参阅 [Rust 引用](https://doc.rust-lang.org/reference/type-layout.html)。"
+"See the [Rust "
+"Reference](https://doc.rust-lang.org/reference/type-layout.html)."
+msgstr "请参阅 [Rust 引用](https://doc.rust-lang.org/reference/type-layout.html)。"
#: src/enums/sizes.md:30
#, fuzzy
@@ -4633,9 +4668,7 @@ msgstr "你可以根据需要控制判别(例如,与 C 的兼容性):"
msgid ""
"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 "
"bytes."
-msgstr ""
-"如果不使用 `repr`,判别类型会占用 2 个字节,因为 10001 是一个 2 个字节的数"
-"值。"
+msgstr "如果不使用 `repr`,判别类型会占用 2 个字节,因为 10001 是一个 2 个字节的数值。"
#: src/enums/sizes.md:54
#, fuzzy
@@ -4652,24 +4685,19 @@ msgstr "`dbg_size!(bool)`:大小占用 1 个字节,对齐占用 1 个字节
msgid ""
"`dbg_size!(Option)`: size 1 bytes, align: 1 bytes (niche optimization, "
"see below),"
-msgstr ""
-"`dbg_size!(Option)`:大小占用 1 个字节,对齐占用 1 个字节(小众优化,请"
-"参阅下文);"
+msgstr "`dbg_size!(Option)`:大小占用 1 个字节,对齐占用 1 个字节(小众优化,请参阅下文);"
#: src/enums/sizes.md:58
#, fuzzy
msgid "`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),"
-msgstr ""
-"`dbg_size!(&i32)`:大小占用 8 个字节,对齐占用 8 个字节(在 64 位设备上);"
+msgstr "`dbg_size!(&i32)`:大小占用 8 个字节,对齐占用 8 个字节(在 64 位设备上);"
#: src/enums/sizes.md:59
#, fuzzy
msgid ""
"`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer "
"optimization, see below)."
-msgstr ""
-"`dbg_size!(Option<&i32>)`:大小占用 8 个字节,对齐占用 8 个字节(Null 指针优"
-"化,请参阅下文)。"
+msgstr "`dbg_size!(Option<&i32>)`:大小占用 8 个字节,对齐占用 8 个字节(Null 指针优化,请参阅下文)。"
#: src/enums/sizes.md:61
#, fuzzy
@@ -4681,13 +4709,13 @@ msgstr "小众优化:Rust 将对枚举判别合并使用 未使用的位模式
#: src/enums/sizes.md:64
#, fuzzy
msgid ""
-"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/"
-"option/#representation), Rust guarantees that `size_of::()` equals "
-"`size_of::