mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
Change type conversion method
This commit is contained in:
parent
f2b00371ef
commit
bb918ca352
|
@ -11,7 +11,6 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -132,7 +131,7 @@ func NewRuleSetProvider(name string, behavior P.RuleType, interval time.Duration
|
|||
}
|
||||
|
||||
if rp.behavior == P.Classical {
|
||||
rp.count = len(*(*[]C.Rule)(unsafe.Pointer(&rules)))
|
||||
rp.count = len(rules.([]C.Rule))
|
||||
} else {
|
||||
rp.count = len(rulesRaw)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user