]> Cypherpunks repositories - gostls13.git/commit
internal/sync: relax value type constraint for HashTrieMap
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 21 Jun 2024 20:09:09 +0000 (20:09 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 18 Nov 2024 20:30:22 +0000 (20:30 +0000)
commit008904aba6b28ea8b9bbb0f5a90987bd3a8a8772
treec15d7bf1bf22c414db772ff349dc8b221c235c13
parent36b5b053beaa649795a85dfe025f93a2e34c952b
internal/sync: relax value type constraint for HashTrieMap

Currently the HashTrieMap requires both keys and values to be
comparable, but it's actually OK if the value is not comparable. Some
operations may fail, but others will not, and we can check comparability
dynamically on map initialization. This makes the implementation
substantially more flexible.

Change-Id: Idc9c30dfa273d80ae4d46a9eefb5c155294408aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/594061
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/internal/sync/hashtriemap.go