Skip to content

Commit d3e089f

Browse files
author
Ruby
committed
fixed the few nits!
1 parent 855f1ff commit d3e089f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/trpl/references-and-borrowing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ This will print `6`. We make `y` a mutable reference to `x`, then add one to
125125
the thing `y` points at. You’ll notice that `x` had to be marked `mut` as well,
126126
if it wasn’t, we couldn’t take a mutable borrow to an immutable value.
127127

128-
You'll also notice we added an asterisk in front of `y`, making it `*y`,
129-
this is because y is an `&mut` reference. You'll also need to use them for
130-
accessing and modifying `&` references as well.
128+
You'll also notice we added an asterisk (`*`) in front of `y`, making it `*y`,
129+
this is because `y` is an `&mut` reference. You'll also need to use them for
130+
accessing the contents of a reference as well.
131131

132132
Otherwise, `&mut` references are just like references. There _is_ a large
133133
difference between the two, and how they interact, though. You can tell

0 commit comments

Comments
 (0)