Skip to content

Commit

Permalink
tree: use ValueAndErr() instead of deprecated Value()
Browse files Browse the repository at this point in the history
  • Loading branch information
asdine committed Nov 26, 2023
1 parent fc8bbf7 commit 2c56dbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/tree/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ func (t *Tree) IterateOnRange(rng *Range, reverse bool, fn func(*Key, []byte) er
k.Encoded = it.Key()
k.Values = nil

err := fn(&k, it.Value())
v, err := it.ValueAndErr()
if err != nil {
return err
}
err = fn(&k, v)
if err != nil {
return err
}
Expand Down

0 comments on commit 2c56dbe

Please sign in to comment.