diff --git a/bucket.go b/bucket.go index 9bf30a2..9724893 100644 --- a/bucket.go +++ b/bucket.go @@ -26,11 +26,12 @@ func (b bucket[K, V]) get(key K) (value V, found bool) { return slot.value, slot.occupied && b.compare(slot.key, key) } -func (b bucket[K, V]) drop(key K) (occupied bool) { +func (b *bucket[K, V]) drop(key K) (occupied bool) { slot := &b.slots[b.location(key)] if slot.occupied && b.compare(slot.key, key) { slot.occupied = false + b.size-- return true }