From 20431706a863f92cb37dc512fef6e48d192aaf2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/itertools/src/combinations_with_replacement.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vendor/itertools/src/combinations_with_replacement.rs') diff --git a/vendor/itertools/src/combinations_with_replacement.rs b/vendor/itertools/src/combinations_with_replacement.rs index 81b13f130..0fec9671a 100644 --- a/vendor/itertools/src/combinations_with_replacement.rs +++ b/vendor/itertools/src/combinations_with_replacement.rs @@ -64,7 +64,7 @@ where // If this is the first iteration, return early if self.first { // In empty edge cases, stop iterating immediately - return if self.indices.len() != 0 && !self.pool.get_next() { + return if !(self.indices.is_empty() || self.pool.get_next()) { None // Otherwise, yield the initial state } else { @@ -92,7 +92,7 @@ where // We need to update the rightmost non-max value // and all those to the right for indices_index in increment_from..self.indices.len() { - self.indices[indices_index] = increment_value + self.indices[indices_index] = increment_value; } Some(self.current()) } -- cgit v1.2.3