aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/var.go b/var.go
index 40c3c74..eabf422 100644
--- a/var.go
+++ b/var.go
@@ -51,13 +51,8 @@ func (v *Var[T]) wakeWatchers(new VarValue) {
})
}
-type varSnapshot struct {
- val interface{}
- version uint64
-}
-
// Returns a new STM variable.
-func NewVar[T any](val interface{}) *Var[T] {
+func NewVar[T any](val T) *Var[T] {
v := &Var[T]{}
v.value.Store(versionedValue{
value: val,