From e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4 Mon Sep 17 00:00:00 2001 From: Chris Wendt Date: Wed, 8 Jun 2022 03:27:33 -0600 Subject: replace "interface{}" with "any" --- var.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var.go') diff --git a/var.go b/var.go index 2354d96..ec6a81e 100644 --- a/var.go +++ b/var.go @@ -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. -- cgit v1.2.3