File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -171,12 +171,10 @@ and a length.
171
171
## Slicing syntax
172
172
173
173
You can use a combo of ` & ` and ` [] ` to create a slice from various things. The
174
- ` & ` indicates that slices are similar to [ references] , which we will cover in
174
+ ` & ` indicates that slices are similar to [ references] [ references ] , which we will cover in
175
175
detail later in this section. The ` [] ` s, with a range, let you define the
176
176
length of the slice:
177
177
178
- [ references ] : references-and-borrowing.html
179
-
180
178
``` rust
181
179
let a = [0 , 1 , 2 , 3 , 4 ];
182
180
let complete = & a [.. ]; // A slice containing all of the elements in a
@@ -198,7 +196,7 @@ documentation][slice].
198
196
Rust’s ` str ` type is the most primitive string type. As an [ unsized type] [ dst ] ,
199
197
it’s not very useful by itself, but becomes useful when placed behind a
200
198
reference, like ` &str ` . We'll elaborate further when we cover
201
- [ Strings] [ strings ] and [ references] .
199
+ [ Strings] [ strings ] and [ references] [ references ] .
202
200
203
201
[ dst ] : unsized-types.html
204
202
[ strings ] : strings.html
You can’t perform that action at this time.
0 commit comments