]> Cypherpunks repositories - gostls13.git/commitdiff
internal/sync: rename Store parameter from old to new
authorIan Lance Taylor <iant@golang.org>
Fri, 8 Aug 2025 21:22:11 +0000 (14:22 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 8 Aug 2025 22:10:55 +0000 (15:10 -0700)
It's not an old value, it's a new value.

Change-Id: I135ecd8815fac9c3d34ca35afa2b62e74fa76cb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/694436
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/internal/sync/hashtriemap.go

index 6f5e0b437fea238e8606cad78c79310ac8bbbbb6..dbf4c3473ed6a236982d5b94d98b76edb608fdeb 100644 (file)
@@ -196,8 +196,8 @@ func (ht *HashTrieMap[K, V]) expand(oldEntry, newEntry *entry[K, V], newHash uin
 }
 
 // Store sets the value for a key.
-func (ht *HashTrieMap[K, V]) Store(key K, old V) {
-       _, _ = ht.Swap(key, old)
+func (ht *HashTrieMap[K, V]) Store(key K, new V) {
+       _, _ = ht.Swap(key, new)
 }
 
 // Swap swaps the value for a key and returns the previous value if any.