forked from TrueCloudLab/frostfs-node
[#1460] blobovnicza: Do not use pointers as the results
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
0e4a1beecf
commit
010253a97a
4 changed files with 12 additions and 12 deletions
|
@ -117,7 +117,7 @@ type IterateRes struct {
|
|||
// Returns handler's errors directly. Returns nil after iterating finish.
|
||||
//
|
||||
// Handler should not retain object data. Handler must not be nil.
|
||||
func (b *Blobovnicza) Iterate(prm IteratePrm) (*IterateRes, error) {
|
||||
func (b *Blobovnicza) Iterate(prm IteratePrm) (IterateRes, error) {
|
||||
var elem IterationElement
|
||||
|
||||
if err := b.boltDB.View(func(tx *bbolt.Tx) error {
|
||||
|
@ -140,10 +140,10 @@ func (b *Blobovnicza) Iterate(prm IteratePrm) (*IterateRes, error) {
|
|||
})
|
||||
})
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
return IterateRes{}, err
|
||||
}
|
||||
|
||||
return new(IterateRes), nil
|
||||
return IterateRes{}, nil
|
||||
}
|
||||
|
||||
// IterateObjects is a helper function which iterates over Blobovnicza and passes binary objects to f.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue