1
0
mirror of https://github.com/golang/go synced 2024-11-26 03:57:57 -07:00

runtime: constify a test variable

Simple cleanup, no functionality change.

Change-Id: I8eceda4496a396e0117a0a601186c653982fb004
GitHub-Last-Rev: 58defc575e
GitHub-Pull-Request: golang/go#47389
Reviewed-on: https://go-review.googlesource.com/c/go/+/337289
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Carlo Alberto Ferraris 2021-07-25 23:15:15 +00:00 committed by Austin Clements
parent 90ed541149
commit a35c5c98c0
3 changed files with 3 additions and 3 deletions

View File

@ -198,7 +198,7 @@ func MemclrBytes(b []byte) {
memclrNoHeapPointers(s.array, uintptr(s.len))
}
var HashLoad = &hashLoad
const HashLoad = hashLoad
// entry point for testing
func GostringW(w []uint16) (s string) {

View File

@ -473,7 +473,7 @@ func TestMapNanGrowIterator(t *testing.T) {
nan := math.NaN()
const nBuckets = 16
// To fill nBuckets buckets takes LOAD * nBuckets keys.
nKeys := int(nBuckets * *runtime.HashLoad)
nKeys := int(nBuckets * runtime.HashLoad)
// Get map to full point with nan keys.
for i := 0; i < nKeys; i++ {

View File

@ -119,7 +119,7 @@ func reflect_memmove(to, from unsafe.Pointer, n uintptr) {
}
// exported value for testing
var hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
const hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
//go:nosplit
func fastrand() uint32 {