refactor with sugar-n-spice
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"go-nkode/internal/utils"
|
||||
"github.com/DonovanKelly/sugar-n-spice/set"
|
||||
"log"
|
||||
"math/big"
|
||||
r "math/rand"
|
||||
@@ -84,7 +84,7 @@ func GenerateRandomNonRepeatingUint64(listLen int) ([]uint64, error) {
|
||||
if listLen > int(1)<<32 {
|
||||
return nil, ErrRandNonRepeatingUint64
|
||||
}
|
||||
listSet := make(utils.Set[uint64])
|
||||
listSet := make(set.Set[uint64])
|
||||
for {
|
||||
if listSet.Size() == listLen {
|
||||
break
|
||||
@@ -104,7 +104,7 @@ func GenerateRandomNonRepeatingInt(listLen int) ([]int, error) {
|
||||
if listLen > int(1)<<31 {
|
||||
return nil, ErrRandNonRepeatingInt
|
||||
}
|
||||
listSet := make(utils.Set[int])
|
||||
listSet := make(set.Set[int])
|
||||
for {
|
||||
if listSet.Size() == listLen {
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user