File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 77A slice is a [ dynamically sized type] representing a 'view' into a sequence of
88elements 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
1817Examples:
1918
You can’t perform that action at this time.
0 commit comments