summaryrefslogtreecommitdiffstats
path: root/vendor/itertools/src/combinations_with_replacement.rs
diff options
context:
space:
mode:
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())
}