Small fix in the book

Fixes #20914
This commit is contained in:
Steve Klabnik 2015-01-12 10:47:56 -05:00
parent b21a6da340
commit c403794310

View File

@ -82,7 +82,7 @@ arrays:
```{rust}
let a = [0, 1, 2, 3, 4];
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
for e in middle.iter() {
println!("{}", e); // Prints 1, 2, 3