summaryrefslogtreecommitdiffstats
path: root/vendor/itertools/src/combinations_with_replacement.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:12:43 +0000
commitcf94bdc0742c13e2a0cac864c478b8626b266e1b (patch)
tree044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /vendor/itertools/src/combinations_with_replacement.rs
parentAdding debian version 1.65.0+dfsg1-2. (diff)
downloadrustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz
rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/itertools/src/combinations_with_replacement.rs')
-rw-r--r--vendor/itertools/src/combinations_with_replacement.rs4
1 files changed, 2 insertions, 2 deletions
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())
}