Skip to content

Commit

Permalink
cleanup last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alicebob committed Dec 13, 2023
1 parent 422ad09 commit abc5615
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions cmd_hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package miniredis

import (
"math/big"
"math/rand"
"strconv"
"strings"

Expand Down Expand Up @@ -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))])
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions miniredis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit abc5615

Please sign in to comment.