mirror of
https://github.com/restic/restic.git
synced 2025-04-27 21:51:39 +00:00
Merge pull request #548 from mappu/patch-1
idset.go: micro-optimise away redundant scan
This commit is contained in:
commit
e1960cadb2
@ -55,11 +55,7 @@ func (s IDSet) Equals(other IDSet) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for id := range other {
|
// length + one-way comparison is sufficient implication of equality
|
||||||
if _, ok := s[id]; !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user