We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2e4964e + c331a92 commit 939f84aCopy full SHA for 939f84a
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