internal/sync: rename Store parameter from old to new

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>
This commit is contained in:
Ian Lance Taylor 2025-08-08 14:22:11 -07:00 committed by Gopher Robot
parent 317be4cfeb
commit fbac94a799

View 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. // Store sets the value for a key.
func (ht *HashTrieMap[K, V]) Store(key K, old V) { func (ht *HashTrieMap[K, V]) Store(key K, new V) {
_, _ = ht.Swap(key, old) _, _ = ht.Swap(key, new)
} }
// Swap swaps the value for a key and returns the previous value if any. // Swap swaps the value for a key and returns the previous value if any.