Use assert!(chunk_size != 0) instead of > 0 for usize value

This commit is contained in:
Sebastian Dröge 2018-01-02 01:57:46 +02:00
parent 9957cf6023
commit c096b3a451

View File

@ -532,7 +532,7 @@ impl<T> SliceExt for [T] {
#[inline]
fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<T> {
assert!(chunk_size > 0);
assert!(chunk_size != 0);
ChunksMut { v: self, chunk_size: chunk_size }
}