wgengine/filter: remove unused Clone methods.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/910/head
David Anderson 4 years ago committed by Dave Anderson
parent b3634f020d
commit a8589636a8

@ -56,17 +56,6 @@ type Match struct {
Srcs []netaddr.IPPrefix
}
// Clone returns a deep copy of m.
func (m Match) Clone() (res Match) {
if m.Dsts != nil {
res.Dsts = append([]NetPortRange{}, m.Dsts...)
}
if m.Srcs != nil {
res.Srcs = append([]netaddr.IPPrefix{}, m.Srcs...)
}
return res
}
func (m Match) String() string {
srcs := []string{}
for _, src := range m.Srcs {
@ -93,11 +82,3 @@ func (m Match) String() string {
// Matches is a list of packet matchers.
type Matches []Match
// Clone returns a deep copy of ms.
func (ms Matches) Clone() (res Matches) {
for _, match := range ms {
res = append(res, match.Clone())
}
return res
}

Loading…
Cancel
Save