]> Cypherpunks repositories - gostls13.git/commitdiff
internal/fuzz: remove the exp2 method
authorJakub Ciolek <jakub@ciolek.dev>
Fri, 3 Jan 2025 16:23:05 +0000 (17:23 +0100)
committerGopher Robot <gobot@golang.org>
Fri, 3 Jan 2025 18:10:07 +0000 (10:10 -0800)
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>

src/internal/fuzz/mutators_byteslice_test.go
src/internal/fuzz/pcg.go

index 56adca25372ed6f9e3ecd1900355398e963889cc..b12ef6cbcdd0bdf250236ecba001c8d9fe1725da 100644 (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
index dc07b9f5bdc43754f91dfa0ae362ad5320bf9517..b8251043f1c129207703da27acd8342142f46e6a 100644 (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