Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rim99 committed Oct 3, 2024
1 parent eb72975 commit 3aa1286
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/database/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ macro_rules! impl_iterator {
($T:ty, $Item:ty, $ItemMethod:ident) => {
impl<'a, K: Serializable + Ord> iter::Iterator for $T {
type Item = $Item;

// The "next" method would iterate once, and stop at the end (to_key).
// Use "advance" method if starting from begin (from_key) again is preferred
fn next(&mut self) -> Option<Self::Item> {
if self.advance() && !self.stopped() {
Some(self.$ItemMethod())
Expand Down

0 comments on commit 3aa1286

Please sign in to comment.