From 0bdf71fd12245e06b3bb34b2562e9558c786f310 Mon Sep 17 00:00:00 2001 From: "M.V. Hutz" Date: Fri, 3 Apr 2026 16:26:51 +0200 Subject: [PATCH] refactor: 'MinimumLoad' to 'defaultMinimumLoad' - The option does not need to be exported, since it is no longer an option. --- settings.go | 8 ++++---- table.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/settings.go b/settings.go index 7c84ee4..fe0408f 100644 --- a/settings.go +++ b/settings.go @@ -12,12 +12,12 @@ const DefaultCapacity uint64 = 16 // hash table implementations use 2. const DefaultGrowthFactor uint64 = 2 -// MinimumLoad is the default lowest acceptable occupancy of a [Table]. The -// higher the minimum load, the more likely that a [Table.Put] will not succeed. -// The value of 5% is taken from [libcuckoo]. +// defaultMinimumLoad is the default lowest acceptable occupancy of a [Table]. +// The higher the minimum load, the more likely that a [Table.Put] will not +// succeed. The value of 5% is taken from [libcuckoo]. // // [libcuckoo]: https://github.com/efficient/libcuckoo/blob/656714705a055df2b7a605eb3c71586d9da1e119/libcuckoo/cuckoohash_config.hh#L21 -const MinimumLoad float64 = 0.05 +const defaultMinimumLoad float64 = 0.05 type settings struct { growthFactor uint64 diff --git a/table.go b/table.go index e644daf..922aa81 100644 --- a/table.go +++ b/table.go @@ -198,7 +198,7 @@ func NewCustomTable[K, V any](hashA, hashB Hash[K], compare EqualFunc[K], option settings := &settings{ growthFactor: DefaultGrowthFactor, bucketSize: DefaultCapacity, - minLoadFactor: MinimumLoad, + minLoadFactor: defaultMinimumLoad, } for _, option := range options {