We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7e50e30 + b7c2db4 commit 31be255Copy full SHA for 31be255
core/src/slice/mod.rs
@@ -814,7 +814,7 @@ impl<T> [T] {
814
#[stable(feature = "rust1", since = "1.0.0")]
815
#[inline]
816
pub fn chunks(&self, chunk_size: usize) -> Chunks<'_, T> {
817
- assert_ne!(chunk_size, 0);
+ assert_ne!(chunk_size, 0, "chunks cannot have a size of zero");
818
Chunks::new(self, chunk_size)
819
}
820
@@ -852,7 +852,7 @@ impl<T> [T] {
852
853
854
pub fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<'_, T> {
855
856
ChunksMut::new(self, chunk_size)
857
858
0 commit comments