Skip to content

Commit

Permalink
fixed the few nits!
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruby committed Aug 6, 2015
1 parent 855f1ff commit d3e089f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/doc/trpl/references-and-borrowing.md
Expand Up @@ -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. You’ll notice that `x` had to be marked `mut` as well,
if it wasn’t, we couldn’t 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
Expand Down

0 comments on commit d3e089f

Please sign in to comment.