From 39e80131b3539cb9662a80b92065e424bc757e26 Mon Sep 17 00:00:00 2001 From: funkill2 Date: Tue, 17 Dec 2024 04:00:17 +0300 Subject: [PATCH] update original --- rustbook-en/src/appendix-06-translation.md | 2 +- rustbook-en/src/ch02-00-guessing-game-tutorial.md | 4 ++-- rustbook-en/src/ch10-03-lifetime-syntax.md | 2 +- rustbook-en/src/ch20-01-unsafe-rust.md | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rustbook-en/src/appendix-06-translation.md b/rustbook-en/src/appendix-06-translation.md index 0a8077b9..a4dd1d3b 100644 --- a/rustbook-en/src/appendix-06-translation.md +++ b/rustbook-en/src/appendix-06-translation.md @@ -12,7 +12,7 @@ For resources in languages other than English. Most are still in progress; see - [Українська](https://rust-lang-ua.github.io/rustbook_ukrainian) - [Español](https://github.com/thecodix/book), [alternate](https://github.com/ManRR/rust-book-es), [Español por RustLangES](https://github.com/RustLangES/rust-book-es) - [Русский](https://github.com/rust-lang-ru/book) -- [한국어](https://github.com/rinthel/rust-lang-book-ko) +- [한국어](https://github.com/rust-kr/doc.rust-kr.org) - [日本語](https://github.com/rust-lang-ja/book-ja) - [Français](https://github.com/Jimskapt/rust-book-fr) - [Polski](https://github.com/paytchoo/book-pl) diff --git a/rustbook-en/src/ch02-00-guessing-game-tutorial.md b/rustbook-en/src/ch02-00-guessing-game-tutorial.md index e2e7054d..e73918ba 100644 --- a/rustbook-en/src/ch02-00-guessing-game-tutorial.md +++ b/rustbook-en/src/ch02-00-guessing-game-tutorial.md @@ -238,8 +238,8 @@ possible state a _variant_. of these `Result` types is to encode error-handling information. `Result`’s variants are `Ok` and `Err`. The `Ok` variant indicates the -operation was successful, and inside `Ok` is the successfully generated value. -The `Err` variant means the operation failed, and `Err` contains information +operation was successful, and it contains the successfully generated value. +The `Err` variant means the operation failed, and it contains information about how or why the operation failed. Values of the `Result` type, like values of any type, have methods defined on diff --git a/rustbook-en/src/ch10-03-lifetime-syntax.md b/rustbook-en/src/ch10-03-lifetime-syntax.md index 0a356ec6..6b92470c 100644 --- a/rustbook-en/src/ch10-03-lifetime-syntax.md +++ b/rustbook-en/src/ch10-03-lifetime-syntax.md @@ -567,7 +567,7 @@ let s: &'static str = "I have a static lifetime."; The text of this string is stored directly in the program’s binary, which is always available. Therefore, the lifetime of all string literals is `'static`. -You might see suggestions to use the `'static` lifetime in error messages. But +You might see suggestions in error messages to use the `'static` lifetime. But before specifying `'static` as the lifetime for a reference, think about whether the reference you have actually lives the entire lifetime of your program or not, and whether you want it to. Most of the time, an error message diff --git a/rustbook-en/src/ch20-01-unsafe-rust.md b/rustbook-en/src/ch20-01-unsafe-rust.md index 8796483a..7d4d8d8c 100644 --- a/rustbook-en/src/ch20-01-unsafe-rust.md +++ b/rustbook-en/src/ch20-01-unsafe-rust.md @@ -534,6 +534,9 @@ annotation makes it easier to track down the source of problems when they occur. Whenever you write unsafe code, you can use Miri to help you be more confident that the code you have written upholds Rust’s rules. +For a much deeper exploration of how to work effectively with unsafe Rust, read +Rust’s official guide to the subject, the [Rustonomicon][nomicon]. + [dangling-references]: ch04-02-references-and-borrowing.html#dangling-references [differences-between-variables-and-constants]: ch03-01-variables-and-mutability.html#constants [extensible-concurrency-with-the-sync-and-send-traits]: ch16-04-extensible-concurrency-sync-and-send.html#extensible-concurrency-with-the-sync-and-send-traits @@ -541,3 +544,4 @@ that the code you have written upholds Rust’s rules. [reference]: ../reference/items/unions.html [miri]: https://github.com/rust-lang/miri [nightly]: appendix-07-nightly-rust.html +[nomicon]: https://doc.rust-lang.org/nomicon/