We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec7df7e + c403794 commit e9291d3Copy full SHA for e9291d3
src/doc/trpl/arrays-vectors-and-slices.md
@@ -82,7 +82,7 @@ arrays:
82
83
```{rust}
84
let a = [0, 1, 2, 3, 4];
85
-let middle = a.slice(1, 4); // A slice of a: just the elements [1,2,3]
+let middle = &a[1..4]; // A slice of a: just the elements 1, 2, and 3
86
87
for e in middle.iter() {
88
println!("{}", e); // Prints 1, 2, 3
0 commit comments