feat!: Drop returns bool, Put doesn't stack-overflow #21

Merged
mvhutz merged 12 commits from feat/safe-put into main 2026-04-17 01:31:02 +00:00
Showing only changes of commit fce6325454 - Show all commits

View File

@@ -18,8 +18,8 @@ type subtable[K, V any] struct {
compare EqualFunc[K] compare EqualFunc[K]
} }
// location determines where in the bucket a certain key would be placed. If the // location determines where in the subtable a certain key would be placed. If
// capacity is 0, this will panic. // the capacity is 0, this will panic.
func (t *subtable[K, V]) location(key K) uint64 { func (t *subtable[K, V]) location(key K) uint64 {
return t.hash(key) % t.capacity return t.hash(key) % t.capacity
} }