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