mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 04:43:14 +08:00
fix: atomic.TypedValue panic
This commit is contained in:
parent
4542fc0991
commit
72d0948224
@ -43,7 +43,7 @@ func (t *TypedValue[T]) Swap(new T) T {
|
|||||||
if old == nil {
|
if old == nil {
|
||||||
return DefaultValue[T]()
|
return DefaultValue[T]()
|
||||||
}
|
}
|
||||||
return old.(T)
|
return old.(tValue[T]).value
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TypedValue[T]) CompareAndSwap(old, new T) bool {
|
func (t *TypedValue[T]) CompareAndSwap(old, new T) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user