Skip to content

Commit

Permalink
Correct size of returned iterator
Browse files Browse the repository at this point in the history
The methods don't return `size` slices, but rather slices of
`size` elements. Sorry!
  • Loading branch information
urschrei committed Feb 20, 2016
1 parent 8c554e0 commit 41a63bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcollections/slice.rs
Expand Up @@ -406,8 +406,8 @@ impl<T> [T] {
core_slice::SliceExt::windows(self, size)
}

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

/// Returns an iterator over `chunk_size` slices of the slice at a time.
/// The chunks are mutable and do not overlap. If `chunk_size` does
/// Returns an iterator over `chunk_size` elements of the slice at a time.
/// The chunks are mutable slices, and do not overlap. If `chunk_size` does
/// not divide the length of the slice, then the last chunk will not
/// have length `chunk_size`.
///
Expand Down

0 comments on commit 41a63bd

Please sign in to comment.