Skip to content

Commit

Permalink
debug: use slice Stale sort (#6263)
Browse files Browse the repository at this point in the history
Co-authored-by: hanwang <hanwang.7721@bytedance.com>
  • Loading branch information
Hanwn and hanwang committed Apr 26, 2023
1 parent 407beda commit aeb2986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit aeb2986

Please sign in to comment.