From 2c56dbe25bea8451cb50a312027356a34a0e6157 Mon Sep 17 00:00:00 2001 From: Asdine El Hrychy Date: Sun, 26 Nov 2023 13:43:07 +0400 Subject: [PATCH] tree: use ValueAndErr() instead of deprecated Value() --- internal/tree/tree.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/tree/tree.go b/internal/tree/tree.go index b96644e0..23eb6372 100644 --- a/internal/tree/tree.go +++ b/internal/tree/tree.go @@ -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 }