mirror of
https://github.com/restic/restic.git
synced 2025-08-22 13:27:45 +00:00
idset.go: micro-optimise away redundant scan
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user