From f64f438cbe36cc1cd7ba9cfd836bb63ef63aaecd Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 13:46:43 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=E3=80=8C=E3=81=91=E3=81=A4=E5=85=A5?= =?UTF-8?q?=E3=82=8C=E9=A0=AD=E5=87=BA=E3=81=97=E3=80=8D=E3=81=A8=E3=81=84?= =?UTF-8?q?=E3=81=86=E8=A8=80=E8=91=89=E3=82=88=E3=82=8A=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E3=81=AB=E8=AA=AC=E6=98=8E=E3=81=97=E3=81=9F=E3=81=BB=E3=81=86?= =?UTF-8?q?=E3=81=8C=E3=81=84=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-01-what-is-ownership.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/ch04-01-what-is-ownership.md b/second-edition/src/ch04-01-what-is-ownership.md index e5ef37062..a95edc210 100644 --- a/second-edition/src/ch04-01-what-is-ownership.md +++ b/second-edition/src/ch04-01-what-is-ownership.md @@ -112,7 +112,7 @@ Rustと所有権システムの規則と経験を積むにつれて、自然に > > スタックもヒープも、実行時にコードが使用できるメモリの一部になりますが、異なる手段で構成されています。 > スタックは、得た順番に値を並べ、逆の順で値を取り除いていきます。これは、 -> *last in, first out*(`訳注`: あえて日本語にするなら、けつ入れ頭出しといったところでしょうか)と呼ばれます。 +> *last in, first out*(`訳注`: あえて日本語にするなら、「最後に入れたものが最初に出てくる」といったところでしょうか)と呼ばれます。 > お皿の山を思い浮かべてください: お皿を追加する時には、山の一番上に置き、お皿が必要になったら、一番上から1枚を取り去りますよね。 > 途中や一番下に追加したり、取り除いたりすることもできません。データを追加することは、 > *スタックにpushする*といい、データを取り除くことは、*スタックからpopする*と表現します(`訳注`: From 73dd8a88f4061c0c8d116f7d5f9408f1a037db3c Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 13:47:57 +0900 Subject: [PATCH 02/14] =?UTF-8?q?allocate=E3=81=8C=E5=94=90=E7=AA=81?= =?UTF-8?q?=E3=81=AB=E5=87=BA=E3=81=A6=E3=81=8D=E3=81=A6=E3=81=84=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E3=80=81=E5=8E=9F=E6=96=87=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=81=A6=E6=84=8F=E5=91=B3=E3=82=92=E9=80=9A?= =?UTF-8?q?=E3=82=8A=E3=82=84=E3=81=99=E3=81=8F=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-01-what-is-ownership.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/second-edition/src/ch04-01-what-is-ownership.md b/second-edition/src/ch04-01-what-is-ownership.md index a95edc210..63d32a19d 100644 --- a/second-edition/src/ch04-01-what-is-ownership.md +++ b/second-edition/src/ch04-01-what-is-ownership.md @@ -125,8 +125,8 @@ Rustと所有権システムの規則と経験を積むにつれて、自然に > コンパイル時にサイズがわからなかったり、サイズが可変のデータについては、代わりにヒープに格納することができます。 > ヒープは、もっとごちゃごちゃしています: ヒープにデータを置く時、あるサイズのスペースを求めます。 > OSはヒープ上に十分な大きさの空の領域を見つけ、使用中にし、*ポインタ*を返してきます。ポインタとは、その場所へのアドレスです。 -> この過程は、*ヒープに領域を確保する*と呼ばれ、時としてそのフレーズを単に*allocateする*などと省略したりします。 -> (`訳注`: こちらもこなれた日本語訳はないでしょう。allocateはメモリを確保すると訳したいところですが) +> この過程は、*ヒープに領域を確保する(allocating on the heap)*と呼ばれ、時としてそのフレーズを単に*allocateする*などと省略したりします。 +> (`訳注`: こちらもこなれた日本語訳はないでしょう。allocateは「メモリを確保する」と訳したいところですが) > スタックに値を載せることは、メモリ確保とは考えられません。ポインタは、既知の固定サイズなので、 > スタックに保管することができますが、実データが必要になったら、ポインタを追いかける必要があります。 > From 164c1271cf69dd5aed2a655e6dd4e7a465189b37 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 13:49:40 +0900 Subject: [PATCH 03/14] =?UTF-8?q?=E3=83=A1=E3=83=A2=E3=83=AA=E3=81=AE?= =?UTF-8?q?=E9=80=80=E5=BB=83=E3=81=A8=E3=81=84=E3=81=86=E8=A8=80=E8=91=89?= =?UTF-8?q?=E3=81=AF=E4=B8=80=E8=88=AC=E7=9A=84=E3=81=A7=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E6=99=AE=E9=80=9A=E3=81=AB=E8=A7=A3=E8=AA=AC?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-01-what-is-ownership.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/second-edition/src/ch04-01-what-is-ownership.md b/second-edition/src/ch04-01-what-is-ownership.md index 63d32a19d..3d498b5e7 100644 --- a/second-edition/src/ch04-01-what-is-ownership.md +++ b/second-edition/src/ch04-01-what-is-ownership.md @@ -564,7 +564,8 @@ do if Rust copied the heap data as well --> その変数が使っていたヒープメモリを片付けると述べました。しかし、図4-2は、 両方のデータポインタが同じ場所を指していることを示しています。これは問題です: `s2`と`s1`がスコープを抜けたら、 両方とも同じメモリを解放しようとします。これは*二重解放*エラーとして知られ、以前触れたメモリ安全性上のバグの一つになります。 -メモリを2回解放することは、メモリの退廃につながり、さらにセキュリティ上の脆弱性を生む可能性があります。 +メモリを2回解放することは、memory corruption (`訳注`: メモリの崩壊。意図せぬメモリの書き換え) につながり、 +セキュリティ上の脆弱性を生む可能性があります。 From 9910dc992c6651a794e1068c2fa6445cee545b74 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 13:50:23 +0900 Subject: [PATCH 04/14] =?UTF-8?q?works=20just=20fine=E3=81=AE=E8=AA=A4?= =?UTF-8?q?=E8=A8=B3=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-01-what-is-ownership.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/ch04-01-what-is-ownership.md b/second-edition/src/ch04-01-what-is-ownership.md index 3d498b5e7..cb6c60a15 100644 --- a/second-edition/src/ch04-01-what-is-ownership.md +++ b/second-edition/src/ch04-01-what-is-ownership.md @@ -673,7 +673,7 @@ println!("s1 = {}, s2 = {}", s1, s2); -これは単純にうまく動き、図4-3で示した動作を明示的に生み出します。ここでは、 +これは問題なく動作し、図4-3で示した動作を明示的に生み出します。ここでは、 ヒープデータが*実際に*コピーされています。 From 130dc241f8b0b60077e5936d636a975386acbed3 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 13:52:25 +0900 Subject: [PATCH 05/14] =?UTF-8?q?=E5=9E=8B=E3=81=AE=E8=AA=AC=E6=98=8E?= =?UTF-8?q?=E3=81=8C=E9=9D=9E=E5=B8=B8=E3=81=AB=E5=88=86=E3=81=8B=E3=82=8A?= =?UTF-8?q?=E3=81=A5=E3=82=89=E3=81=84=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-01-what-is-ownership.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/second-edition/src/ch04-01-what-is-ownership.md b/second-edition/src/ch04-01-what-is-ownership.md index cb6c60a15..820b1448c 100644 --- a/second-edition/src/ch04-01-what-is-ownership.md +++ b/second-edition/src/ch04-01-what-is-ownership.md @@ -753,9 +753,9 @@ Rustには`Copy`トレイトと呼ばれる特別な注釈があり、 * あらゆる整数型。`u32`など。 -* 論理値型、`bool`、`true`と`false`という値がある。 +* 論理値型である`bool`。`true`と`false`という値がある。 * あらゆる浮動小数点型、`f64`など。 -* 文字型、`char`。 +* 文字型である`char`。 * タプル。ただ、`Copy`の型だけを含む場合。例えば、`(i32, i32)`は`Copy`だが、 `(i32, String)`は違う。 From f83be8b48c46c2bc35ec2ca22703d738ea32b777 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 13:56:34 +0900 Subject: [PATCH 06/14] =?UTF-8?q?=E3=80=8C=E8=84=86=E3=81=8F=E3=80=8D?= =?UTF-8?q?=E3=80=8C=E3=81=AA=E3=82=89=E3=81=AA=E3=81=91=E3=82=8C=E3=81=B0?= =?UTF-8?q?=E3=81=8A=E3=81=8B=E3=81=97=E3=81=84=E3=80=8D=E3=81=AF=E5=8E=9F?= =?UTF-8?q?=E6=96=87=E3=81=AE=E3=83=8B=E3=83=A5=E3=82=A2=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E3=81=A8=E3=81=97=E3=81=A6=E9=81=A9=E5=88=87=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-03-slices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/second-edition/src/ch04-03-slices.md b/second-edition/src/ch04-03-slices.md index df8ffbff6..02fd5924b 100644 --- a/second-edition/src/ch04-03-slices.md +++ b/second-edition/src/ch04-03-slices.md @@ -201,8 +201,8 @@ fn main() { `word`内の添え字が`s`に格納されたデータと同期されなくなるのを心配することは、面倒ですし間違いになりやすいです! -これらの添え字を管理するのは、`second_word`関数を書いたら、さらに脆くなります。 -そのシグニチャは以下のようにならなければおかしいです: +これらの添え字の管理は、`second_word`関数を書いたら、さらに難しくなります。 +そのシグニチャは以下のようになるはずです: ```rust,ignore fn second_word(s: &String) -> (usize, usize) { From ba66327a152e26f6ccf5d0174e518c0dab8e3c88 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 13:59:27 +0900 Subject: [PATCH 07/14] =?UTF-8?q?`floating=20around`=E3=81=AF=E3=80=8C?= =?UTF-8?q?=E5=8B=9D=E6=89=8B=E6=B0=97=E3=81=BE=E3=81=BE=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E3=82=8F=E3=81=A3=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E3=80=8D?= =?UTF-8?q?=E3=81=A8=E3=81=84=E3=81=86=E3=83=8B=E3=83=A5=E3=82=A2=E3=83=B3?= =?UTF-8?q?=E3=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-03-slices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/ch04-03-slices.md b/second-edition/src/ch04-03-slices.md index 02fd5924b..daf3ebb40 100644 --- a/second-edition/src/ch04-03-slices.md +++ b/second-edition/src/ch04-03-slices.md @@ -214,7 +214,7 @@ fn second_word(s: &String) -> (usize, usize) { 今、私たちは開始*と*終端の添え字を追うようになりました。特定の状態のデータから計算されたけど、 -その状態に全く紐付かない値が増えました。同期を取る必要のある宙に浮いた関連性のない変数が3つになってしまいました。 +その状態に全く紐付かない値が増えました。いつの間にか変わってしまうので、同期を取る必要のある、関連性のない変数が3つになってしまいました。 From 63369bc8ef7b37b07dc4f71690a79befd33f7e05 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 14:00:43 +0900 Subject: [PATCH 08/14] =?UTF-8?q?=E6=96=87=E6=84=8F=E3=82=92=E3=82=8F?= =?UTF-8?q?=E3=81=8B=E3=82=8A=E3=82=84=E3=81=99=E3=81=8F=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=81=9F=E3=82=81=E8=A8=80=E8=91=89=E3=81=AE=E9=A0=86=E7=95=AA?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch04-03-slices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/ch04-03-slices.md b/second-edition/src/ch04-03-slices.md index daf3ebb40..bcb18eee3 100644 --- a/second-edition/src/ch04-03-slices.md +++ b/second-edition/src/ch04-03-slices.md @@ -355,7 +355,7 @@ fn first_word(s: &String) -> &str { リスト4-7で取った手段と同じ方法で単語の終端添え字を取得しています。つまり、最初の空白を探すことです。 -空白を発見したら、文字列の最初と、空白の添え字を開始、終了地点として使用して文字列スライスを返しています。 +空白を発見したら、文字列の最初を開始地点、空白の添え字を終了地点として使用して文字列スライスを返しています。 From 665a551ee7fbb629923ea42d5d7fa931a5c8e1a9 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 14:06:25 +0900 Subject: [PATCH 09/14] =?UTF-8?q?"rather=20than"=E3=82=92=E6=8D=89?= =?UTF-8?q?=E3=81=88=E3=81=9D=E3=81=93=E3=81=AD=E3=81=A6=E3=81=84=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch05-02-example-structs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/ch05-02-example-structs.md b/second-edition/src/ch05-02-example-structs.md index ace1c9a48..541539fe2 100644 --- a/second-edition/src/ch05-02-example-structs.md +++ b/second-edition/src/ch05-02-example-structs.md @@ -208,7 +208,7 @@ fn area(rectangle: &Rectangle) -> u32 { `area`関数は、`Rectangle`インスタンスの`width`と`height`フィールドにアクセスしています。 これで、`area`の関数シグニチャは、我々の意図をズバリ示すようになりました: `width`と`height`フィールドを使って、 `Rectangle`の面積を計算します。これにより、幅と高さが相互に関係していることが伝わり、 -タプルの`0`や`1`という添え字を使うのではなく、値に説明的な名前を与えられるのです。簡潔性を勝ち取ったわけですね。 +タプルの`0`や`1`という添え字を使うよりも、これらの値に説明的な名前を与えられるのです。簡潔性を勝ち取ったわけですね。 From ec34f7e2e3228707f33711d7b1945a199ed9d0ce Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 14:07:12 +0900 Subject: [PATCH 10/14] =?UTF-8?q?"clarity"=E3=81=AF=E3=80=8C=E7=B0=A1?= =?UTF-8?q?=E6=BD=94=E6=80=A7=E3=80=8D=E3=81=A7=E3=81=AF=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch05-02-example-structs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/ch05-02-example-structs.md b/second-edition/src/ch05-02-example-structs.md index 541539fe2..2e567b6bf 100644 --- a/second-edition/src/ch05-02-example-structs.md +++ b/second-edition/src/ch05-02-example-structs.md @@ -208,7 +208,7 @@ fn area(rectangle: &Rectangle) -> u32 { `area`関数は、`Rectangle`インスタンスの`width`と`height`フィールドにアクセスしています。 これで、`area`の関数シグニチャは、我々の意図をズバリ示すようになりました: `width`と`height`フィールドを使って、 `Rectangle`の面積を計算します。これにより、幅と高さが相互に関係していることが伝わり、 -タプルの`0`や`1`という添え字を使うよりも、これらの値に説明的な名前を与えられるのです。簡潔性を勝ち取ったわけですね。 +タプルの`0`や`1`という添え字を使うよりも、これらの値に説明的な名前を与えられるのです。プログラムの意図が明瞭になりました。 From 022aab739092208c0f23e4ed307ce2f348e4c3ff Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 14:09:08 +0900 Subject: [PATCH 11/14] =?UTF-8?q?=E6=96=87=E6=84=8F=E3=81=8C=E6=8E=B4?= =?UTF-8?q?=E3=81=BF=E3=81=A5=E3=82=89=E3=81=84=E3=81=AE=E3=81=A7=E5=99=9B?= =?UTF-8?q?=E3=81=BF=E7=A0=95=E3=81=84=E3=81=9F=E6=96=87=E7=AB=A0=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "ergonomic"を「使うのが簡単である」と訳したのはやり過ぎかも --- second-edition/src/ch05-03-method-syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/second-edition/src/ch05-03-method-syntax.md b/second-edition/src/ch05-03-method-syntax.md index 4e95431a5..2ffccbc0e 100644 --- a/second-edition/src/ch05-03-method-syntax.md +++ b/second-edition/src/ch05-03-method-syntax.md @@ -197,8 +197,8 @@ fn main() { > > 前者の方がずっと明確です。メソッドには自明な受け手(`self`の型)がいるので、この自動参照機能は動作するのです。 > 受け手とメソッド名が与えられれば、コンパイラは確実にメソッドが読み込み専用(`&self`)か、書き込みもする(`&mut self`)のか、 -> 所有権を奪う(`self`)のか判断できるわけです。Rustにおいて、メソッドの受け手に関して借用が明示されないという事実は、 -> 所有権を現実世界でエルゴノミックにさせる大部分を占めているのです。 +> 所有権を奪う(`self`)のか判断できるわけです。メソッドの受け手に関して借用が明示されないというのが、 +> 所有権を実際に使うのがRustにおいて簡単である大きな理由です。 From d929e2cde4bb104d2579369646597b7fe3a1d4a5 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 14:11:16 +0900 Subject: [PATCH 12/14] =?UTF-8?q?=E6=96=87=E7=AB=A0=E3=82=92=E3=82=8F?= =?UTF-8?q?=E3=81=8B=E3=82=8A=E3=82=84=E3=81=99=E3=81=8F=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit もとの文は"might"を過去形と捉えてしまっている?「あなたがたが思いつくかもしれないアイデアよりも」 程度の意味なので、こう訳すのが適当か --- second-edition/src/ch06-01-defining-an-enum.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/ch06-01-defining-an-enum.md b/second-edition/src/ch06-01-defining-an-enum.md index f67e7629c..38b21fb64 100644 --- a/second-edition/src/ch06-01-defining-an-enum.md +++ b/second-edition/src/ch06-01-defining-an-enum.md @@ -253,7 +253,7 @@ enum IpAddr { このコードは、enum列挙子内にいかなる種類のデータでも格納できることを描き出しています: 例を挙げれば、文字列、数値型、構造体などです。他のenumを含むことさえできます!また、 -標準ライブラリの型は、あなたが思い付いた可能性のあるものよりも複雑ではないことがしばしばあります。 +標準ライブラリの型は、あなたの想像するよりも複雑ではないことがしばしばあります。 From ca98c9da6129d7c0a664c0f250c98427c0083b0b Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 14:14:43 +0900 Subject: [PATCH 13/14] =?UTF-8?q?"our"=E3=81=AE=E8=A8=B3=E3=81=97=E5=BF=98?= =?UTF-8?q?=E3=82=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- second-edition/src/ch06-01-defining-an-enum.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/second-edition/src/ch06-01-defining-an-enum.md b/second-edition/src/ch06-01-defining-an-enum.md index 38b21fb64..9a125e253 100644 --- a/second-edition/src/ch06-01-defining-an-enum.md +++ b/second-edition/src/ch06-01-defining-an-enum.md @@ -260,8 +260,8 @@ enum IpAddr { -標準ライブラリに`IpAddr`に対する定義は含まれるものの、標準ライブラリの定義をスコープに導入していないので、 -まだ、干渉することなく自分自身の定義を生成して使用できることに注意してください。型をスコープに導入することについては、 +標準ライブラリに`IpAddr`に対する定義は含まれるものの、標準ライブラリの定義をまだ我々のスコープに導入していないので、 +干渉することなく自分自身の定義を生成して使用できることに注意してください。型をスコープに導入することについては、 第7章でもっと詳しく言及します。 From 6642ce41bdab0def4ced0530dcf32e1313f68d15 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sat, 21 Mar 2020 14:15:27 +0900 Subject: [PATCH 14/14] =?UTF-8?q?"when"=E3=82=92=E3=80=8C=E6=99=82?= =?UTF-8?q?=E3=80=8D=E3=81=A8=E7=9B=B4=E8=A8=B3=E3=81=99=E3=82=8B=E3=81=A8?= =?UTF-8?q?=E6=84=8F=E5=91=B3=E3=81=8C=E5=88=86=E3=81=8B=E3=82=8A=E3=81=A5?= =?UTF-8?q?=E3=82=89=E3=81=8F=E3=81=AA=E3=82=8B=E3=81=AE=E3=81=A7=E3=82=8F?= =?UTF-8?q?=E3=81=8B=E3=82=8A=E3=82=84=E3=81=99=E3=81=8F=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原文では1文なのに2文になってしまっており、やや原文から離れているが意味は捉えているつもり --- second-edition/src/ch06-02-match.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/second-edition/src/ch06-02-match.md b/second-edition/src/ch06-02-match.md index 6f4632be0..175a62539 100644 --- a/second-edition/src/ch06-02-match.md +++ b/second-edition/src/ch06-02-match.md @@ -390,9 +390,9 @@ error[E0004]: non-exhaustive patterns: `None` not covered 全可能性を網羅していないことをコンパイラは検知しています。もっと言えば、どのパターンを忘れているかさえ知っているのです。 Rustにおけるマッチは、*包括的*です: 全てのあらゆる可能性を網羅し尽くさなければ、コードは有効にならないのです。 -特に`Option`の場合には、コンパイラが明示的に`None`の場合を扱うのを忘れないようにする時、 -nullになるかもしれない値があることを想定しないように、故に、前に議論した10億ドルの失敗を犯さないよう、 -保護してくれるわけです。 +特に`Option`の場合には、私達が明示的に`None`の場合を処理するのを忘れないようにしてくれます。 +nullになるかもしれないのに値があると思い込まないよう、すなわち前に議論した10億ドルの失敗を犯さないよう、 +コンパイラが保護してくれるわけです。