Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/references/exclusive.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Key points:
making an `&point.0` or changing `point.0` while `x_coord` is alive.

- Be sure to note the difference between `let mut x_coord: &i32` and
`let x_coord: &mut i32`. The first one represents a shared reference which can
be bound to different values, while the second represents an exclusive
reference to a mutable value.
`let x_coord: &mut i32`. The first one is a shared reference that can be bound
to different values, while the second is an exclusive reference to a mutable
value.

</details>
6 changes: 3 additions & 3 deletions src/references/slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ fn main() {
- You can't "grow" a slice once it's created:
- You can't append elements of the slice, since it doesn't own the backing
buffer.
- You can't grow a slice to point to a larger section of the backing buffer.
The slice loses information about the underlying buffer and so you can't
know how larger the slice can be grown.
- You can't grow a slice to point to a larger section of the backing buffer. A
slice does not have information about the length of the underlying buffer
and so you can't know how large the slice can be grown.
- To get a larger slice you have to back to the original buffer and create a
larger slice from there.

Expand Down