Skip to content

Commit

Permalink
Merge pull request #548 from mappu/patch-1
Browse files Browse the repository at this point in the history
idset.go: micro-optimise away redundant scan
  • Loading branch information
fd0 committed Jul 28, 2016
2 parents e8e45fe + 32985f7 commit e1960ca
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/restic/backend/idset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e1960ca

Please sign in to comment.