Skip to content

Commit

Permalink
fix: atomic.TypedValue panic
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Mar 29, 2024
1 parent 4542fc0 commit 72d0948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/atomic/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (t *TypedValue[T]) Swap(new T) T {
if old == nil {
return DefaultValue[T]()
}
return old.(T)
return old.(tValue[T]).value
}

func (t *TypedValue[T]) CompareAndSwap(old, new T) bool {
Expand Down

0 comments on commit 72d0948

Please sign in to comment.