aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/store_ec.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/store_ec.go')
-rw-r--r--weed/storage/store_ec.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go
index 70e1593a0..0c9de45aa 100644
--- a/weed/storage/store_ec.go
+++ b/weed/storage/store_ec.go
@@ -4,9 +4,9 @@ import (
"context"
"fmt"
"github.com/chrislusf/seaweedfs/weed/pb"
+ "golang.org/x/exp/slices"
"io"
"os"
- "sort"
"sync"
"time"
@@ -389,8 +389,8 @@ func (s *Store) EcVolumes() (ecVolumes []*erasure_coding.EcVolume) {
}
location.ecVolumesLock.RUnlock()
}
- sort.Slice(ecVolumes, func(i, j int) bool {
- return ecVolumes[i].VolumeId > ecVolumes[j].VolumeId
+ slices.SortFunc(ecVolumes, func(a, b *erasure_coding.EcVolume) bool {
+ return a.VolumeId > b.VolumeId
})
return ecVolumes
}