chore(model): the easier linter complaints

This commit is contained in:
Jakob Borg
2025-06-06 13:45:44 +02:00
parent e25de22705
commit 700bb75016
10 changed files with 62 additions and 53 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ type standardBlockPullReorderer struct {
}
func newStandardBlockPullReorderer(id protocol.DeviceID, otherDevices []protocol.DeviceID) *standardBlockPullReorderer {
allDevices := append(otherDevices, id)
allDevices := append(otherDevices, id) //nolint:gocritic
slices.SortFunc(allDevices, func(a, b protocol.DeviceID) int {
return a.Compare(b)
})
@@ -92,7 +92,7 @@ func (p *standardBlockPullReorderer) Reorder(blocks []protocol.BlockInfo) []prot
// The rest of the chunks we fetch in a random order in whole chunks.
// Generate chunk index slice and shuffle it
indexes := make([]int, 0, len(chunks)-1)
for i := range len(chunks) {
for i := range chunks {
if i != p.myIndex {
indexes = append(indexes, i)
}