File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,8 @@ let takes_nums = || nums;
183
183
<!-- in our closure, we have to take ownership of `nums`. It’s the same as if we’d -->
184
184
<!-- passed `nums` to a function that took ownership of it. -->
185
185
` Vec<T> ` はその要素に対する所有権を持っています、
186
- それゆえそれらの要素をクロージャ内で参照した場合、 ` num ` の所有権を取ることになります。
187
- これは ` num ` を ` num ` の所有権を取る関数に渡した場合と同じです。
186
+ それゆえそれらの要素をクロージャ内で参照した場合、 ` nums ` の所有権を取ることになります。
187
+ これは ` nums ` を ` nums ` の所有権を取る関数に渡した場合と同じです。
188
188
189
189
<!-- ## `move` closures -->
190
190
## ` move ` クロージャ
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ error: non-exhaustive patterns: `_` not covered
58
58
<!-- program will compile successfully. -->
59
59
言い換えると、Rustは値を忘れていることを伝えようとしているのです。
60
60
なぜなら ` x ` は整数であるため、Rustは ` x ` は多くの異なる値を取ることができることを知っています。
61
- 例えば、 ` 6 ` などがそれにに当たります 。
61
+ 例えば、 ` 6 ` などがそれに当たります 。
62
62
もし ` _ ` がなかった場合、 ` 6 ` にマッチする腕が存在しない事になります、そのためRustはコンパイルを通しません。
63
63
` _ ` は「全てキャッチする腕」のように振る舞います。
64
64
もし他の腕がどれもマッチしなかった場合、 ` _ ` の腕が実行されることになります、
Original file line number Diff line number Diff line change @@ -183,8 +183,8 @@ let takes_nums = || nums;
183
183
<!-- in our closure, we have to take ownership of `nums`. It’s the same as if we’d -->
184
184
<!-- passed `nums` to a function that took ownership of it. -->
185
185
` Vec<T> ` はその要素に対する所有権を持っています、
186
- それゆえそれらの要素をクロージャ内で参照した場合、 ` num ` の所有権を取ることになります。
187
- これは ` num ` を ` num ` の所有権を取る関数に渡した場合と同じです。
186
+ それゆえそれらの要素をクロージャ内で参照した場合、 ` nums ` の所有権を取ることになります。
187
+ これは ` nums ` を ` nums ` の所有権を取る関数に渡した場合と同じです。
188
188
189
189
<!-- ## `move` closures -->
190
190
## ` move ` クロージャ
You can’t perform that action at this time.
0 commit comments