all: use Go 1.21 slices, maps instead of x/exp/{slices,maps}
Updates #8419 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
e8d140654a
commit
e8551d6b40
@ -19,7 +19,6 @@ import (
|
||||
|
||||
"github.com/tailscale/wireguard-go/device"
|
||||
"github.com/tailscale/wireguard-go/tun"
|
||||
"golang.org/x/exp/maps"
|
||||
"tailscale.com/control/controlclient"
|
||||
"tailscale.com/envknob"
|
||||
"tailscale.com/health"
|
||||
@ -619,7 +618,7 @@ func (e *userspaceEngine) maybeReconfigWireguardLocked(discoChanged map[key.Node
|
||||
// Don't re-alloc the map; the Go compiler optimizes map clears as of
|
||||
// Go 1.11, so we can re-use the existing + allocated map.
|
||||
if e.trimmedNodes != nil {
|
||||
maps.Clear(e.trimmedNodes)
|
||||
clear(e.trimmedNodes)
|
||||
} else {
|
||||
e.trimmedNodes = make(map[key.NodePublic]bool)
|
||||
}
|
||||
|
Reference in New Issue
Block a user