From 53b98cfddef7afcb79d8a1b35fb186b58426c1d4 Mon Sep 17 00:00:00 2001 From: Chris Wendt Date: Wed, 8 Jun 2022 01:35:20 -0600 Subject: use generic atomic --- tx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tx.go') diff --git a/tx.go b/tx.go index 9be08b5..3cd0301 100644 --- a/tx.go +++ b/tx.go @@ -24,7 +24,7 @@ type Tx struct { // Check that none of the logged values have changed since the transaction began. func (tx *Tx) inputsChanged() bool { for v, read := range tx.reads { - if read.Changed(v.value.Load().(VarValue)) { + if read.Changed(v.value.Load()) { return true } } @@ -84,7 +84,7 @@ func (tx *Tx) Get(v *Var) interface{} { // If we haven't previously read v, record its version vv, ok := tx.reads[v] if !ok { - vv = v.value.Load().(VarValue) + vv = v.value.Load() tx.reads[v] = vv } return vv.Get() -- cgit v1.2.3