Skip to content

Commit 41a63bd

Browse files
committed
Correct size of returned iterator
The methods don't return `size` slices, but rather slices of `size` elements. Sorry!
1 parent 8c554e0 commit 41a63bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcollections/slice.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ impl<T> [T] {
406406
core_slice::SliceExt::windows(self, size)
407407
}
408408

409-
/// Returns an iterator over `size` slices of the slice at a
410-
/// time. The chunks do not overlap. If `size` does not divide the
409+
/// Returns an iterator over `size` elements of the slice at a
410+
/// time. The chunks are slices and do not overlap. If `size` does not divide the
411411
/// length of the slice, then the last chunk will not have length
412412
/// `size`.
413413
///
@@ -432,8 +432,8 @@ impl<T> [T] {
432432
core_slice::SliceExt::chunks(self, size)
433433
}
434434

435-
/// Returns an iterator over `chunk_size` slices of the slice at a time.
436-
/// The chunks are mutable and do not overlap. If `chunk_size` does
435+
/// Returns an iterator over `chunk_size` elements of the slice at a time.
436+
/// The chunks are mutable slices, and do not overlap. If `chunk_size` does
437437
/// not divide the length of the slice, then the last chunk will not
438438
/// have length `chunk_size`.
439439
///

0 commit comments

Comments
 (0)