From 5c25070556787785a75c6fdbb1fe061060581213 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 9 Nov 2019 11:50:30 +0200 Subject: [PATCH] lib/uint64set: remove superflouos check for item existence before deleting it in Set.Subtract --- lib/uint64set/uint64set.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/uint64set/uint64set.go b/lib/uint64set/uint64set.go index ee119333e..0bbea5f45 100644 --- a/lib/uint64set/uint64set.go +++ b/lib/uint64set/uint64set.go @@ -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) } }