mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
use slices.Reverse from go1.21
This commit is contained in:
parent
cc873efd0f
commit
b3abd0bf1d
4 changed files with 10 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue