From 4c0292cff57e1c044cc5e85bd387a98cc5f035ee Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Mon, 1 Aug 2022 18:48:47 +0400 Subject: [PATCH] Simplify `ArrayChunks::is_empty` --- library/core/src/iter/adapters/array_chunks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/iter/adapters/array_chunks.rs b/library/core/src/iter/adapters/array_chunks.rs index 3e8f6281d35..901f559c435 100644 --- a/library/core/src/iter/adapters/array_chunks.rs +++ b/library/core/src/iter/adapters/array_chunks.rs @@ -312,6 +312,6 @@ where #[inline] fn is_empty(&self) -> bool { - self.iter.len() / N == 0 + self.iter.len() < N } }