diff options
author | Oskar Haarklou Veileborg <ohv1020@hotmail.com> | 2023-01-05 12:08:25 +0100 |
---|---|---|
committer | Oskar Haarklou Veileborg <ohv1020@hotmail.com> | 2023-01-18 09:03:56 +0100 |
commit | d191f15b9fed8692eef13b938fc3b3bb59260673 (patch) | |
tree | 1a4bdedc9fc17535130f58551fadc3511630372b /README.md | |
parent | Widen key constraint to 'any' for maps and sets (diff) | |
download | pds-d191f15b9fed8692eef13b938fc3b3bb59260673.tar.gz pds-d191f15b9fed8692eef13b938fc3b3bb59260673.tar.xz |
Update documentation
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -241,7 +241,7 @@ Hashers are fairly simple. They only need to generate hashes for a given key and check equality given two keys. ```go -type Hasher[K comparable] interface { +type Hasher[K any] interface { Hash(key K) uint32 Equal(a, b K) bool } @@ -277,7 +277,7 @@ Comparers on have one method—`Compare()`. It works the same as the `1` if a is greater than `b`, and returns `0` if `a` is equal to `b`. ```go -type Comparer[K comparable] interface { +type Comparer[K any] interface { Compare(a, b K) int } ``` |