use slices.Reverse from go1.21

This commit is contained in:
Shivaram Lingamneni
2023-08-15 20:45:00 -04:00
parent cc873efd0f
commit b3abd0bf1d
4 changed files with 10 additions and 16 deletions
+3 -2
View File
@@ -11,6 +11,7 @@ import (
"fmt"
"io"
"runtime/debug"
"slices"
"strings"
"sync"
"sync/atomic"
@@ -917,7 +918,7 @@ func (mysql *MySQL) betweenTimestamps(ctx context.Context, target, correspondent
results, err = mysql.selectItems(ctx, queryBuf.String(), args...)
if err == nil && !ascending {
utils.ReverseSlice(results)
slices.Reverse(results)
}
return
}
@@ -965,7 +966,7 @@ func (mysql *MySQL) listCorrespondentsInternal(ctx context.Context, target strin
}
if !ascending {
utils.ReverseSlice(results)
slices.Reverse(results)
}
return