diff --git a/bitset/bitset.go b/bitset/bitset.go index f1c881e..ba97a34 100644 --- a/bitset/bitset.go +++ b/bitset/bitset.go @@ -85,9 +85,7 @@ func (s *BitSet) SetAll() { // UnsetAll sets all bits to 0. func (s *BitSet) UnsetAll() { - for i := range s.blocks { - s.blocks[i] = 0 - } + clear(s.blocks) } // FlipAll flips all bits.