debug: use slice Stale sort (#6263)

Co-authored-by: hanwang <hanwang.7721@bytedance.com>
This commit is contained in:
hanwn 2023-04-26 22:19:46 +08:00 committed by GitHub
parent 407bedae0a
commit aeb298635b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ func sortCallbacks(cs []*callback) (fns []func(*DB), err error) {
names, sorted []string
sortCallback func(*callback) error
)
sort.Slice(cs, func(i, j int) bool {
sort.SliceStable(cs, func(i, j int) bool {
if cs[j].before == "*" && cs[i].before != "*" {
return true
}