refactor: 'MinimumLoad' to 'defaultMinimumLoad'
Some checks failed
CI / Check PR Title (pull_request) Failing after 18s
CI / Go Lint (pull_request) Successful in 36s
CI / Markdown Lint (pull_request) Successful in 22s
CI / Makefile Lint (pull_request) Successful in 34s
CI / Unit Tests (pull_request) Successful in 36s
CI / Fuzz Tests (pull_request) Successful in 1m6s
CI / Mutation Tests (pull_request) Successful in 1m1s

- The option does not need to be exported, since it is no longer an
  option.
This commit is contained in:
2026-04-03 16:26:51 +02:00
parent 8b55ce7264
commit 0bdf71fd12
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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 {