Skip to content

Commit

Permalink
caching: do not ignore unmarshalling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Jan 27, 2025
1 parent 8b32e26 commit 613597a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion caching/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ func (ds *DBStore[K, V]) Get(idx int) (*btree.Node[K, int, V], error) {
return nil, err
}
node := &btree.Node[K, int, V]{}
_ = msgpack.Unmarshal(bytes, node)
err = msgpack.Unmarshal(bytes, node)
if err != nil {
return nil, err
}
return node, nil
}

Expand Down

0 comments on commit 613597a

Please sign in to comment.