Skip to content

Commit bf0bbd5

Browse files
committed
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 <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Damien Neil <[email protected]> Reviewed-by: Jorropo <[email protected]>
1 parent 504212b commit bf0bbd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/math/rand/v2/rand.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,15 @@ func (r *Rand) Shuffle(n int, swap func(i, j int)) {
253253

254254
// globalRand is the source of random numbers for the top-level
255255
// convenience functions.
256-
var globalRand = &Rand{src: &runtimeSource{}}
256+
var globalRand = &Rand{src: runtimeSource{}}
257257

258258
//go:linkname runtime_rand runtime.rand
259259
func runtime_rand() uint64
260260

261261
// runtimeSource is a Source that uses the runtime fastrand functions.
262262
type runtimeSource struct{}
263263

264-
func (*runtimeSource) Uint64() uint64 {
264+
func (runtimeSource) Uint64() uint64 {
265265
return runtime_rand()
266266
}
267267

0 commit comments

Comments
 (0)