@@ -29,11 +29,11 @@ match x {
29
29
<!-- expression will be evaluated. It’s called `match` because of the term ‘pattern -->
30
30
<!-- matching’, which `match` is an implementation of. There’s a [separate section on -->
31
31
<!-- patterns][patterns] that covers all the patterns that are possible here. -->
32
- ` match ` は一つの式とその式の値に基づく複数のブランチを引数に取ります 。
32
+ ` match ` は一つの式とその式の値に基づく複数のブランチを取ります 。
33
33
一つ一つの「腕」は ` val => expression ` という形式を取ります。
34
34
値がマッチした時に、対応する腕の式が評価されます。
35
- このような式が ` match ` と呼ばれるのは「パターンマッチ」に由来します 。
36
- 可能なすべてのパターンについて説明した、 [ パターンの説明のために書かれたセクション ] [ patterns ] が存在します 。
35
+ このような式が ` match ` と呼ばれるのは「パターンマッチ」という用語に由来します 。
36
+ [ パターン ] [ patterns ] のセクションではこの部分に書けるすべてのパターンを説明しています 。
37
37
38
38
[ patterns ] : patterns.html
39
39
@@ -59,7 +59,7 @@ Rustは何かしらの値を忘れていると教えてくれています。
59
59
60
60
<!-- `match` is also an expression, which means we can use it on the right-hand -->
61
61
<!-- side of a `let` binding or directly where an expression is used: -->
62
- ` match ` は式でも有ります 、これはつまり ` let ` 束縛の右側や式が使われているところで利用することができるということを意味しています。
62
+ ` match ` は式でもあります 、これはつまり ` let ` 束縛の右側や式が使われているところで利用することができるということを意味しています。
63
63
64
64
``` rust
65
65
let x = 5 ;
@@ -76,7 +76,7 @@ let number = match x {
76
76
77
77
<!-- Sometimes it’s a nice way of converting something from one type to another; in -->
78
78
<!-- this example the integers are converted to `String`. -->
79
- ` match ` はしばしば、ある型からある型へ変換するための良い手段になります 。
79
+ このようにして、ある型から他の型への変換がうまく書ける場合があります 。
80
80
この例では整数が ` String ` に変換されています。
81
81
82
82
<!-- # Matching on enums -->
@@ -118,7 +118,7 @@ fn process_message(msg: Message) {
118
118
<!-- Unlike the previous uses of `match`, you can’t use the normal `if` -->
119
119
<!-- statement to do this. You can use the [`if let`][if-let] statement, -->
120
120
<!-- which can be seen as an abbreviated form of `match`. -->
121
- 上で説明した値に対する ` match ` の利用とは異なり、列挙型のバリアントに基いた分岐に ` if ` を用いることはできません。
122
- 列挙型のバリアントに基いた分岐に [ ` if let ` ] [ if-let ] 文を用いることが可能です、 ` if let ` を ` match ` の短縮形と捉えることができます。
121
+ 先ほど説明した値に対する ` match ` の利用とは異なり、列挙型のバリアントに基いた分岐に ` if ` を用いることはできません。
122
+ 列挙型のバリアントに基いた分岐には [ ` if let ` ] [ if-let ] 文を用いることが可能です。 ` if let ` は ` match ` の短縮形と捉えることができます。
123
123
124
124
[ if-let ] : if-let.html
0 commit comments