[#168] client: Adopt replacement of pointer slices with struct slices

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-11 12:16:08 +03:00 committed by Alex Vanin
parent e89a0d88d2
commit 9c5d3d9dfa
7 changed files with 21 additions and 28 deletions

View file

@ -65,11 +65,8 @@ func (c *Client) AnnounceLocalTrust(ctx context.Context, prm PrmAnnounceLocalTru
reqBody := new(v2reputation.AnnounceLocalTrustRequestBody)
reqBody.SetEpoch(prm.epoch)
trusts := make([]*reputation.Trust, 0, len(prm.trusts))
for i := range prm.trusts {
trusts = append(trusts, &prm.trusts[i])
}
trusts := make([]reputation.Trust, len(prm.trusts))
copy(trusts, prm.trusts)
reqBody.SetTrusts(reputation.TrustsToV2(trusts))