lib/uint64set: remove superflouos check for item existence before deleting it in Set.Subtract

This commit is contained in:
Aliaksandr Valialkin 2019-11-09 11:50:30 +02:00
parent bb08bab263
commit 5c25070556

View file

@ -230,9 +230,7 @@ func (s *Set) Subtract(a *Set) {
aCopy := a.Clone()
// TODO: optimize it
for _, x := range aCopy.AppendTo(nil) {
if s.Has(x) {
s.Del(x)
}
s.Del(x)
}
}