summaryrefslogtreecommitdiff
path: root/libgo/go/sort/slice.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/sort/slice.go')
-rw-r--r--libgo/go/sort/slice.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/sort/slice.go b/libgo/go/sort/slice.go
index 992ad1559df..ba5c2e2f3d3 100644
--- a/libgo/go/sort/slice.go
+++ b/libgo/go/sort/slice.go
@@ -13,7 +13,7 @@ package sort
//
// The less function must satisfy the same requirements as
// the Interface type's Less method.
-func Slice(x interface{}, less func(i, j int) bool) {
+func Slice(x any, less func(i, j int) bool) {
rv := reflectValueOf(x)
swap := reflectSwapper(x)
length := rv.Len()
@@ -26,7 +26,7 @@ func Slice(x interface{}, less func(i, j int) bool) {
//
// The less function must satisfy the same requirements as
// the Interface type's Less method.
-func SliceStable(x interface{}, less func(i, j int) bool) {
+func SliceStable(x any, less func(i, j int) bool) {
rv := reflectValueOf(x)
swap := reflectSwapper(x)
stable_func(lessSwap{less, swap}, rv.Len())
@@ -34,7 +34,7 @@ func SliceStable(x interface{}, less func(i, j int) bool) {
// SliceIsSorted reports whether the slice x is sorted according to the provided less function.
// It panics if x is not a slice.
-func SliceIsSorted(x interface{}, less func(i, j int) bool) bool {
+func SliceIsSorted(x any, less func(i, j int) bool) bool {
rv := reflectValueOf(x)
n := rv.Len()
for i := n - 1; i > 0; i-- {