2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-27 07:16:40 +00:00

Merge pull request #548 from mappu/patch-1

idset.go: micro-optimise away redundant scan
This commit is contained in:
Alexander Neumann 2016-07-28 20:05:23 +02:00
commit e1960cadb2

View File

@ -55,11 +55,7 @@ func (s IDSet) Equals(other IDSet) bool {
}
}
for id := range other {
if _, ok := s[id]; !ok {
return false
}
}
// length + one-way comparison is sufficient implication of equality
return true
}