cleanup last commit

This commit is contained in:
Harmen 2023-12-13 12:09:29 +01:00
parent 422ad09c16
commit abc56151bb
2 changed files with 1 additions and 9 deletions

View File

@ -4,7 +4,6 @@ package miniredis
import (
"math/big"
"math/rand"
"strconv"
"strings"
@ -750,7 +749,7 @@ func (m *Miniredis) cmdHrandfield(c *server.Peer, cmd string, args []string) {
// if count is negative there can be duplicates, but length will match
if len(members) > 0 {
for len(members) < -opts.count {
members = append(members, members[rand.Intn(len(members))])
members = append(members, members[m.randIntn(len(members))])
}
}
}

View File

@ -634,13 +634,6 @@ func (m *Miniredis) randIntn(n int) int {
return m.rand.Intn(n)
}
func (m *Miniredis) randPerm(n int) []int {
if m.rand == nil {
return rand.Perm(n)
}
return m.rand.Perm(n)
}
// shuffle shuffles a list of strings. Kinda.
func (m *Miniredis) shuffle(l []string) {
for range l {