internal/fuzz: remove the exp2 method

It's not being used anywhere, remove it.

Change-Id: I9c3eecacd4e5d44b18243bdec24ad88bc38c82bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/639957
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
This commit is contained in:
Jakub Ciolek 2025-01-03 17:23:05 +01:00 committed by Gopher Robot
parent 5d626c49ec
commit f0a9b6df45
2 changed files with 0 additions and 12 deletions

View file

@ -34,12 +34,6 @@ func (mr *mockRand) uint32n(n uint32) uint32 {
return uint32(c) % n
}
func (mr *mockRand) exp2() int {
c := mr.values[mr.counter]
mr.counter++
return c
}
func (mr *mockRand) bool() bool {
b := mr.b
mr.b = !mr.b

View file

@ -17,7 +17,6 @@ type mutatorRand interface {
uint32() uint32
intn(int) int
uint32n(uint32) uint32
exp2() int
bool() bool
save(randState, randInc *uint64)
@ -123,11 +122,6 @@ func (r *pcgRand) uint32n(n uint32) uint32 {
return uint32(prod >> 32)
}
// exp2 generates n with probability 1/2^(n+1).
func (r *pcgRand) exp2() int {
return bits.TrailingZeros32(r.uint32())
}
// bool generates a random bool.
func (r *pcgRand) bool() bool {
return r.uint32()&1 == 0