fixed the few nits!

This commit is contained in:
Ruby 2015-08-06 19:55:53 +01:00
parent 855f1ff321
commit d3e089f08b
1 changed files with 3 additions and 3 deletions

View File

@ -125,9 +125,9 @@ This will print `6`. We make `y` a mutable reference to `x`, then add one to
the thing `y` points at. Youll notice that `x` had to be marked `mut` as well,
if it wasnt, we couldnt take a mutable borrow to an immutable value.
You'll also notice we added an asterisk in front of `y`, making it `*y`,
this is because y is an `&mut` reference. You'll also need to use them for
accessing and modifying `&` references as well.
You'll also notice we added an asterisk (`*`) in front of `y`, making it `*y`,
this is because `y` is an `&mut` reference. You'll also need to use them for
accessing the contents of a reference as well.
Otherwise, `&mut` references are just like references. There _is_ a large
difference between the two, and how they interact, though. You can tell