mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-12-22 23:57:26 +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 {
|
||||
return DefaultValue[T]()
|
||||
}
|
||||
return old.(T)
|
||||
return old.(tValue[T]).value
|
||||
}
|
||||
|
||||
func (t *TypedValue[T]) CompareAndSwap(old, new T) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user