aboutsummaryrefslogtreecommitdiff
path: root/immutable_test.go
diff options
context:
space:
mode:
authorAmir Laher <amirlaher@Amirs-Air.fritz.box>2022-05-19 23:26:45 +1200
committerAmir Laher <amirlaher@Amirs-Air.fritz.box>2022-05-19 23:26:45 +1200
commit0f044852c7b89191137a36bfcf843587a596b45c (patch)
tree8a40d3f9bc90a05a1873d7b040265ff72195156c /immutable_test.go
parentimplement generic immutable maps (diff)
downloadpds-0f044852c7b89191137a36bfcf843587a596b45c.tar.gz
pds-0f044852c7b89191137a36bfcf843587a596b45c.tar.xz
update readme
Diffstat (limited to 'immutable_test.go')
-rw-r--r--immutable_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/immutable_test.go b/immutable_test.go
index 93f65be..b11b13f 100644
--- a/immutable_test.go
+++ b/immutable_test.go
@@ -2501,11 +2501,11 @@ func (h *mockHasher[K]) Equal(a, b K) bool {
}
// mockComparer represents a mock implementation of immutable.Comparer.
-type mockComparer struct {
- compare func(a, b interface{}) int
+type mockComparer[K constraints.Ordered] struct {
+ compare func(a, b K) int
}
// Compare executes the mocked CompreFn function.
-func (h *mockComparer) Compare(a, b interface{}) int {
+func (h *mockComparer[K]) Compare(a, b K) int {
return h.compare(a, b)
}