mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
net/tsaddr: remove ContainsFunc helpers (they're now in x/exp/slices)
x/exp/slices now has ContainsFunc (golang/go#53983) so we can delete our versions. Change-Id: I5157a403bfc1b30e243bf31c8b611da25e995078 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
4b34c88426
commit
1598cd0361
@@ -11,6 +11,7 @@ import (
|
||||
"errors"
|
||||
"net/netip"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"tailscale.com/net/tsaddr"
|
||||
)
|
||||
|
||||
@@ -213,7 +214,7 @@ func (v IPPrefixSlice) ContainsIP(ip netip.Addr) bool {
|
||||
|
||||
// PrefixesContainsFunc reports whether f is true for any IPPrefix in the slice.
|
||||
func (v IPPrefixSlice) ContainsFunc(f func(netip.Prefix) bool) bool {
|
||||
return tsaddr.PrefixesContainsFunc(v.ж.ж, f)
|
||||
return slices.ContainsFunc(v.ж.ж, f)
|
||||
}
|
||||
|
||||
// ContainsExitRoutes reports whether v contains ExitNode Routes.
|
||||
|
Reference in New Issue
Block a user