[#1671] Use slices.Delete() where possible

gopatch is missing for this one, because
https://github.com/uber-go/gopatch/issues/179

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2025-03-13 09:24:44 +03:00
parent 29b0240673
commit 803a550c1f
Signed by: fyrchik
SSH key fingerprint: SHA256:m/TTwCzjnRkXgnzEx9X92ccxy1CcVeinOgDb3NPWWmg
7 changed files with 15 additions and 8 deletions

View file

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"slices"
"strconv"
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
@ -182,7 +183,7 @@ func (exec *execCtx) addMembers(incoming []oid.ID) {
for i := range members {
for j := 0; j < len(incoming); j++ { // don't use range, slice mutates in body
if members[i].Equals(incoming[j]) {
incoming = append(incoming[:j], incoming[j+1:]...)
incoming = slices.Delete(incoming, j, j+1)
j--
}
}