diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2024-05-02 11:25:07 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2024-05-22 02:25:49 +0000 |
| commit | bf0bbd5360bb4d3ecb03b274fbb8419c69e54c28 (patch) | |
| tree | de0b0eb8524223f8cd9f76f298b815184d0fd7ee /src/math | |
| parent | 504212bbd704a3235da58ecda5f05962c5f30acb (diff) | |
| download | go-bf0bbd5360bb4d3ecb03b274fbb8419c69e54c28.tar.xz | |
math/rand/v2: drop pointer receiver on zero-width type
Just a cleanup.
Change-Id: Ibeb2c7d447c793086280e612fe5f0f7eeb863f71
Reviewed-on: https://go-review.googlesource.com/c/go/+/582875
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Diffstat (limited to 'src/math')
| -rw-r--r-- | src/math/rand/v2/rand.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/rand/v2/rand.go b/src/math/rand/v2/rand.go index fdd770058a..fea1e3a2ba 100644 --- a/src/math/rand/v2/rand.go +++ b/src/math/rand/v2/rand.go @@ -253,7 +253,7 @@ func (r *Rand) Shuffle(n int, swap func(i, j int)) { // globalRand is the source of random numbers for the top-level // convenience functions. -var globalRand = &Rand{src: &runtimeSource{}} +var globalRand = &Rand{src: runtimeSource{}} //go:linkname runtime_rand runtime.rand func runtime_rand() uint64 @@ -261,7 +261,7 @@ func runtime_rand() uint64 // runtimeSource is a Source that uses the runtime fastrand functions. type runtimeSource struct{} -func (*runtimeSource) Uint64() uint64 { +func (runtimeSource) Uint64() uint64 { return runtime_rand() } |
