mirror of
https://github.com/restic/restic.git
synced 2025-03-09 00:00:02 +01:00
idset.go: micro-optimise away redundant scan
This commit is contained in:
parent
e8e45fe2e3
commit
32985f7904
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue