Skip to content

Commit 9dd2000

Browse files
committed
clean up grammar in 'slice types'
1 parent 1872ce2 commit 9dd2000

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/types/slice.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
A slice is a [dynamically sized type] representing a 'view' into a sequence of
88
elements of type `T`. The slice type is written as `[T]`.
99

10-
To use a slice type it generally has to be used behind a pointer for example
11-
as:
10+
Slice types are generally used through pointer types. For example:
1211

13-
* `&[T]`, a 'shared slice', often just called a 'slice', it doesn't own the
14-
data it points to, it borrows it.
15-
* `&mut [T]`, a 'mutable slice', mutably borrows the data it points to.
16-
* `Box<[T]>`, a 'boxed slice'
12+
* `&[T]`: a 'shared slice', often just called a 'slice'. It doesn't own the
13+
data it points to; it borrows it.
14+
* `&mut [T]`: a 'mutable slice'. It mutably borrows the data it points to.
15+
* `Box<[T]>`: a 'boxed slice'
1716

1817
Examples:
1918

0 commit comments

Comments
 (0)