Replace sort.Sort(ByOrder(...)) with slices.SortFunc
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled

This commit is contained in:
Junegunn Choi committed 2026-04-12 10:43:47 +09:00
1 parent 1b0d448c6e
commit bd4a18d0a9
3 files changed
+22 -20

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@ package fzf
import (
"math"
"math/rand"
"slices"
"sort"
"testing"
@@ -19,7 +20,7 @@ func TestOffsetSort(t *testing.T) {
offsets := []Offset{
{3, 5}, {2, 7},
{1, 3}, {2, 9}}
sort.Sort(ByOrder(offsets))
slices.SortFunc(offsets, compareOffsets)
if offsets[0][0] != 1 || offsets[0][1] != 3 ||
offsets[1][0] != 2 || offsets[1][1] != 7 ||