Skip to content

Commit 85daffe

Browse files
committed
apply review comment
1 parent 56ded8b commit 85daffe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1.6/ja/book/mutability.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ let y = &mut x;
4646
<!-- bind `y` to something else (`y = &mut z`), but you can mutate the thing that’s -->
4747
<!-- bound to `y` (`*y = 5`). A subtle distinction. -->
4848
`y` はミュータブル参照へのイミュータブルな束縛であり、 `y` を他の束縛に変える(`y = &mut z`)ことはできません。
49-
しかし、`y` に束縛されているものを変化させること(`*y = 5`)は可能です。
49+
しかし、`y` に束縛されているものを変化させること(`*y = 5`)は可能です。微妙な区別です。
5050

5151
<!-- Of course, if you need both: -->
5252
もちろん、両方が必要ならば:
@@ -123,7 +123,7 @@ let y = x.clone();
123123
<!-- the structure itself. It’s not user facing. For this reason, it hands out `&T` -->
124124
<!-- with `clone()`. If it handed out `&mut T`s, though, that would be a problem. -->
125125
つまり、「イミュータビリティ」の真の定義はこうです: これは2箇所から指されても安全ですか?
126-
`Arc<T>` の例では、イエス: 変更は完全にそれ自身の構造の内側で行われます。ユーザ向いではありません
126+
`Arc<T>` の例では、イエス: 変更は完全にそれ自身の構造の内側で行われます。ユーザからは見えません
127127
このような理由により、 `clone()` を用いて `T&` を配るのです。仮に `&mut T` を配ってしまうと、
128128
問題になるでしょう。
129129
(訳注: `Arc<T>`を用いて複数スレッドにイミュータブル参照を配布し、スレッド間でオブジェクトを共有できます。)

0 commit comments

Comments
 (0)