From c096b3a451b38a84d3168bd2f4ce10a37d61e1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Jan 2018 01:57:46 +0200 Subject: [PATCH] Use assert!(chunk_size != 0) instead of > 0 for usize value --- src/libcore/slice/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 817e309cf77..6b6ec7147b3 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -532,7 +532,7 @@ impl SliceExt for [T] { #[inline] fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut { - assert!(chunk_size > 0); + assert!(chunk_size != 0); ChunksMut { v: self, chunk_size: chunk_size } }