diff options
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/operand_iter.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/src/operand_iter.rs b/rust/src/operand_iter.rs index a9b3c753..ba2bce7c 100644 --- a/rust/src/operand_iter.rs +++ b/rust/src/operand_iter.rs @@ -45,6 +45,8 @@ impl<F: ILFunction + RefCountable> Iterator for OperandIter<F> { if let Some(item) = self.current_iter.next() { self.remaining -= 1; Some(item) + } else if self.remaining == 0 { + None // Only reached if initial length is 0 } else { // Will short-circuit and return `None` once iter is exhausted let iter_idx = self.next_iter_idx?; |
