Pull request: 5035-slices-clone
Updates #5035. Squashed commit of the following: commit 9a5be90a347d4da08649927731b20fd5ecb90be2 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Oct 21 20:11:54 2022 +0300 all: use slices.Clone, netip.AddrPort
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/AdguardTeam/golibs/errors"
|
||||
"github.com/AdguardTeam/golibs/netutil"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
// ARPDB: The Network Neighborhood Database
|
||||
@@ -64,8 +64,8 @@ type Neighbor struct {
|
||||
func (n Neighbor) Clone() (clone Neighbor) {
|
||||
return Neighbor{
|
||||
Name: n.Name,
|
||||
IP: netutil.CloneIP(n.IP),
|
||||
MAC: netutil.CloneMAC(n.MAC),
|
||||
IP: slices.Clone(n.IP),
|
||||
MAC: slices.Clone(n.MAC),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user