Skip to content
Snippets Groups Projects
Unverified Commit 61192f7d authored by Manish R Jain's avatar Manish R Jain
Browse files

Move l.isEnd() checking to within whence.

parent da07c346
No related branches found
No related tags found
No related merge requests found
......@@ -123,10 +123,10 @@ func (l *ListIterator) SeekToIndex(idx int) {
// Seek seeks to the index whose value is greater than or equal to the given UID.
// It uses binary search to move around.
func (l *ListIterator) Seek(uid uint64, whence int) {
if l.isEnd {
return
}
if whence == 1 {
if l.isEnd {
return
}
// Seek the current list first.
for l.lidx < len(l.curBlock.List) && l.curBlock.List[l.lidx] < uid {
l.lidx++
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment