diff options
author | Chris Wendt <chrismwendt@gmail.com> | 2022-06-08 03:27:33 -0600 |
---|---|---|
committer | Chris Wendt <chrismwendt@gmail.com> | 2022-06-08 03:27:33 -0600 |
commit | e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4 (patch) | |
tree | e103d0d81145c087011846af75aac7d328b917c1 /var.go | |
parent | AtomicSet generic value (diff) | |
download | stm-e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4.tar.gz stm-e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4.tar.xz |
replace "interface{}" with "any"
Diffstat (limited to 'var.go')
-rw-r--r-- | var.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -25,7 +25,7 @@ func (v *Var[T]) getLock() *sync.Mutex { return &v.mu } -func (v *Var[T]) changeValue(new interface{}) { +func (v *Var[T]) changeValue(new any) { old := v.value.Load() newVarValue := old.Set(new) v.value.Store(newVarValue) @@ -35,7 +35,7 @@ func (v *Var[T]) changeValue(new interface{}) { } func (v *Var[T]) wakeWatchers(new VarValue) { - v.watchers.Range(func(k, _ interface{}) bool { + v.watchers.Range(func(k, _ any) bool { tx := k.(*Tx) // We have to lock here to ensure that the Tx is waiting before we signal it. Otherwise we // could signal it before it goes to sleep and it will miss the notification. |