Skip to content

Commit

Permalink
fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil-goel committed Sep 12, 2024
1 parent d0906d0 commit 1b76b24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ func (it *Iterator) fill(item *Item) {
}

func hasPrefix(it *Iterator) bool {
// We shouldn't check prefix in case the iterator is going in reverse. Since in reverse we expect
// people to append items to the end of prefix.
if !it.opt.Reverse && len(it.opt.Prefix) > 0 {
return bytes.HasPrefix(y.ParseKey(it.iitr.Key()), it.opt.Prefix)
}
Expand Down

0 comments on commit 1b76b24

Please sign in to comment.