Skip to content

Commit

Permalink
Remove unused problematic method
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Jan 9, 2024
1 parent 19bf2c2 commit c0d5416
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions internal/orderedmap/orderedmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ func (om *OrderedMap[K, V]) Sort() {
slices.Sort(om.s)
}

// SortFunc will sort the map using the given function.
func (om *OrderedMap[K, V]) SortFunc(less func(i, j K) bool) {
slices.SortFunc(om.s, less)
}

// Keys will return a slice of the map's keys in order.
func (om *OrderedMap[K, V]) Keys() []K {
return om.s
Expand Down
11 changes: 0 additions & 11 deletions internal/orderedmap/orderedmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ func TestSort(t *testing.T) {
assert.Equal(t, []int{1, 2, 3}, om.s)
}

func TestSortFunc(t *testing.T) {
om := New[int, string]()
om.Set(3, "three")
om.Set(1, "one")
om.Set(2, "two")
om.SortFunc(func(i, j int) bool {
return i > j
})
assert.Equal(t, []int{3, 2, 1}, om.s)
}

func TestKeysValues(t *testing.T) {
om := New[int, string]()
om.Set(3, "three")
Expand Down

0 comments on commit c0d5416

Please sign in to comment.