[#168] reputation: Replace []*reputation.Trust with []reputation.Trust

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-11 11:56:54 +03:00 committed by Alex Vanin
parent 022f412584
commit 467358f15a

View file

@ -41,12 +41,12 @@ func (x *Trust) ToV2() *reputation.Trust {
// TrustsToV2 converts slice of Trust's to slice of
// NeoFS API v2 reputation.Trust message structures.
func TrustsToV2(xs []*Trust) (res []*reputation.Trust) {
func TrustsToV2(xs []Trust) (res []reputation.Trust) {
if xs != nil {
res = make([]*reputation.Trust, 0, len(xs))
res = make([]reputation.Trust, len(xs))
for i := range xs {
res = append(res, xs[i].ToV2())
res[i] = *xs[i].ToV2()
}
}