mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
317be4cfeb
commit
fbac94a799
1 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue