Skip to content

Commit c096b3a

Browse files
committed
Use assert!(chunk_size != 0) instead of > 0 for usize value
1 parent 9957cf6 commit c096b3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ impl<T> SliceExt for [T] {
532532

533533
#[inline]
534534
fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<T> {
535-
assert!(chunk_size > 0);
535+
assert!(chunk_size != 0);
536536
ChunksMut { v: self, chunk_size: chunk_size }
537537
}
538538

0 commit comments

Comments
 (0)