Skip to content

Commit

Permalink
Merge pull request #1277 from kishaningithub/patch-1
Browse files Browse the repository at this point in the history
Explicit mention of slice range meaning
  • Loading branch information
marioidival authored Oct 5, 2019
2 parents d173747 + 6e19226 commit d90bbb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/primitives/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ fn main() {
analyze_slice(&xs);
// Slices can point to a section of an array
// They are of the form [starting_index..ending_index]
// starting_index is the first position in the slice
// ending_index is one more than the last position in the slice
println!("borrow a section of the array as a slice");
analyze_slice(&ys[1 .. 4]);
Expand Down

0 comments on commit d90bbb7

Please sign in to comment.