fix: public facing key/value fields in entry
All checks were successful
CI / Check PR Title (pull_request) Successful in 19s
CI / Go Lint (pull_request) Successful in 42s
CI / Markdown Lint (pull_request) Successful in 23s
CI / Makefile Lint (pull_request) Successful in 41s
CI / Unit Tests (pull_request) Successful in 41s
CI / Fuzz Tests (pull_request) Successful in 1m12s
CI / Mutation Tests (pull_request) Successful in 58s

This commit is contained in:
2026-04-04 00:38:27 +02:00
parent afead3330a
commit ca66ccd040
2 changed files with 13 additions and 13 deletions

View File

@@ -49,11 +49,11 @@ func (t Table[K, V]) load() float64 {
// size of the table. Returns a displaced entry and 'homeless = true' if an
// entry could not be placed after exhausting evictions.
func (t *Table[K, V]) insert(entry Entry[K, V]) (displaced Entry[K, V], homeless bool) {
if t.bucketA.update(entry.key, entry.value) {
if t.bucketA.update(entry.Key, entry.Value) {
return
}
if t.bucketB.update(entry.key, entry.value) {
if t.bucketB.update(entry.Key, entry.Value) {
return
}
@@ -190,7 +190,7 @@ func (t Table[K, V]) Entries() iter.Seq2[K, V] {
return func(yield func(K, V) bool) {
for _, slot := range t.bucketA.slots {
if slot.occupied {
if !yield(slot.key, slot.value) {
if !yield(slot.Key, slot.Value) {
return
}
}
@@ -198,7 +198,7 @@ func (t Table[K, V]) Entries() iter.Seq2[K, V] {
for _, slot := range t.bucketB.slots {
if slot.occupied {
if !yield(slot.key, slot.value) {
if !yield(slot.Key, slot.Value) {
return
}
}