mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-02 16:06:47 +00:00
fix: atomic.TypedValue panic
This commit is contained in:
1 parent
4542fc0991
commit
72d0948224
1 file changed
+1
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user