From 467358f15a548f3e04266d55f54e650619bb9485 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Fri, 11 Mar 2022 11:56:54 +0300 Subject: [PATCH] [#168] reputation: Replace []*reputation.Trust with []reputation.Trust Signed-off-by: Alex Vanin --- reputation/trust.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reputation/trust.go b/reputation/trust.go index 62f1d31..ec7eea7 100644 --- a/reputation/trust.go +++ b/reputation/trust.go @@ -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() } }