Simplify slice to array conversion

This commit is contained in:
Oleksandr Redko
2025-08-10 14:47:55 +03:00
committed by 世界
parent e1dbcccab5
commit 76ee64ae50
4 changed files with 5 additions and 5 deletions

View File

@@ -454,5 +454,5 @@ func parseADGuardIPCIDRLine(ruleLine string) (netip.Prefix, error) {
for len(ruleParts) < 4 {
ruleParts = append(ruleParts, 0)
}
return netip.PrefixFrom(netip.AddrFrom4(*(*[4]byte)(ruleParts)), bitLen), nil
return netip.PrefixFrom(netip.AddrFrom4([4]byte(ruleParts)), bitLen), nil
}