forked from TrueCloudLab/frostfs-sdk-go
[#168] client: Adopt replacement of pointer slices with struct slices
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
e89a0d88d2
commit
9c5d3d9dfa
7 changed files with 21 additions and 28 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue