mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-17 16:02:28 +00:00
init the slice better
This commit is contained in:
parent
787a1625ad
commit
22fb52a6d8
@ -106,7 +106,7 @@ func (a *authorization) SelfAllowed() bool {
|
|||||||
|
|
||||||
func (a *authorization) AllowedPeers() views.Slice[*ipnstate.PeerStatus] {
|
func (a *authorization) AllowedPeers() views.Slice[*ipnstate.PeerStatus] {
|
||||||
if a.peers == nil {
|
if a.peers == nil {
|
||||||
return views.SliceOf([]*ipnstate.PeerStatus{})
|
return views.Slice[*ipnstate.PeerStatus]{}
|
||||||
}
|
}
|
||||||
a.mu.Lock()
|
a.mu.Lock()
|
||||||
defer a.mu.Unlock()
|
defer a.mu.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user