aboutsummaryrefslogtreecommitdiff
path: root/var.go
diff options
context:
space:
mode:
Diffstat (limited to 'var.go')
-rw-r--r--var.go4
1 files changed, 2 insertions, 2 deletions
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.