fix: resize of Table.Drop() now decreases size

- Generalized Table.resize() to accept a capacity size for each bucket.
This commit is contained in:
2026-03-19 20:01:50 -04:00
parent 74ed81761c
commit c1314f8a3c
3 changed files with 27 additions and 14 deletions

View File

@@ -25,6 +25,6 @@ func TestLoad(t *testing.T) {
for i := range 16 {
err := table.Put(i, true)
assert.NoError(err)
assert.Equal(float64(table.Size())/float64(table.Capacity()), table.load())
assert.Equal(float64(table.Size())/float64(table.TotalCapacity()), table.load())
}
}