Skip to content

Commit

Permalink
Adjust return type of the slices.SortFunc compare function
Browse files Browse the repository at this point in the history
Version of the `golang.org/x/exp` package has been bumped up.
The returned type of the compare function used in `slices.SortFunc`
was changed from `bool` to `int` somewhere between.
  • Loading branch information
lukasz-zimnoch committed Feb 6, 2024
1 parent 6314012 commit 5a980c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/tbtc/coordination_test.go
Expand Up @@ -394,8 +394,8 @@ loop:
}
}

slices.SortFunc(reports, func(i, j *report) bool {
return i.operatorIndex < j.operatorIndex
slices.SortFunc(reports, func(i, j *report) int {
return i.operatorIndex - j.operatorIndex
})

testutils.AssertIntsEqual(t, "reports count", 3, len(reports))
Expand Down

0 comments on commit 5a980c7

Please sign in to comment.