From 1598cd0361f3ca74fd052d4d804e052cb091cab9 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 5 Dec 2022 18:22:53 -0800 Subject: 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 --- types/views/views.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'types') diff --git a/types/views/views.go b/types/views/views.go index c8d147a3d..92d230674 100644 --- a/types/views/views.go +++ b/types/views/views.go @@ -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. -- cgit v1.3-3-g829e