Skip to content

Commit 9e27154

Browse files
committed
Avoid redundant call to is_done
get_next does the same check internally.
1 parent c92f6a5 commit 9e27154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/combinations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl<I> Iterator for Combinations<I>
6363
let mut i: usize = self.indices.len() - 1;
6464

6565
// Check if we need to consume more from the iterator
66-
if self.indices[i] == self.pool.len() - 1 && !self.pool.is_done() {
66+
if self.indices[i] == self.pool.len() - 1 {
6767
self.pool.get_next(); // may change pool size
6868
}
6969

0 commit comments

Comments
 (0)