mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
all: use iterators over slice views more
This gets close to all of the remaining ones. Updates #12912 Change-Id: I9c672bbed2654a6c5cab31e0cbece6c107d8c6fa Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
00be1761b7
commit
4e0fc037e6
@@ -67,7 +67,7 @@ func (ss *Slice[T]) Add(vs ...T) {
|
||||
|
||||
// AddSlice adds all elements in vs to the set.
|
||||
func (ss *Slice[T]) AddSlice(vs views.Slice[T]) {
|
||||
for i := range vs.Len() {
|
||||
ss.Add(vs.At(i))
|
||||
for _, v := range vs.All() {
|
||||
ss.Add(v)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user