Skip to content

Commit d90bbb7

Browse files
authored
Merge pull request #1277 from kishaningithub/patch-1
Explicit mention of slice range meaning
2 parents d173747 + 6e19226 commit d90bbb7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/primitives/array.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ fn main() {
4242
analyze_slice(&xs);
4343
4444
// Slices can point to a section of an array
45+
// They are of the form [starting_index..ending_index]
46+
// starting_index is the first position in the slice
47+
// ending_index is one more than the last position in the slice
4548
println!("borrow a section of the array as a slice");
4649
analyze_slice(&ys[1 .. 4]);
4750

0 commit comments

Comments
 (0)