Skip to content

Commit bdfad24

Browse files
authored
Explain why more() returns always false. (#126)
1 parent d56b823 commit bdfad24

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/iterators/recorded.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ impl<T: Counter> PickyIterator<T> for Iter {
2424
}
2525

2626
fn more(&mut self, _: usize) -> bool {
27+
// more() is really more_with_zero_counts(), but here as this is the
28+
// record-picker, we never visit empty bins, and thus there will never
29+
// be `more()`
30+
//
31+
// If we yield a record, by definition the current bin cannot be empty,
32+
// and as we iterate over record, once the last one is yielded, there
33+
// can't any more bins to yield.
2734
false
2835
}
2936
}

0 commit comments

Comments
 (0)