storage/memorybysubnet: replace range with len()

This commit is contained in:
Jimmy Zelinskie 2017-05-03 21:16:07 -04:00
parent 370004a9f5
commit d07b61d67d

View file

@ -133,18 +133,14 @@ type swarm struct {
func (s swarm) lenSeeders() (i int) {
for _, subnet := range s.seeders {
for range subnet {
i++
}
i += len(subnet)
}
return
}
func (s swarm) lenLeechers() (i int) {
for _, subnet := range s.leechers {
for range subnet {
i++
}
i += len(subnet)
}
return
}