We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5da76ee commit 2b76da8Copy full SHA for 2b76da8
library/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