Skip to content

Commit

Permalink
Chop more dead code (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyvega committed Jul 19, 2021
1 parent 602007c commit f2b8ac1
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions bot/normal/helpers.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package normal

import (
"encoding/hex"
"fmt"
"math"
"time"

Expand All @@ -13,22 +11,6 @@ import (
"gonum.org/v1/gonum/stat/distuv"
)

func hexToRaw(data []byte) ([]byte, error) {
raw := make([]byte, hex.DecodedLen(len(data)))
n, err := hex.Decode(raw, data)
if err != nil {
return nil, fmt.Errorf("failed to decode hex: %w", err)
}
if n != len(raw) {
return nil, fmt.Errorf("failed to decode hex: decoded %d bytes, expected to decode %d bytes", n, len(raw))
}
return raw, nil
}

func rawToHex(data []byte) string {
return hex.EncodeToString(data)
}

func max(a, b uint64) uint64 {
if a > b {
return a
Expand Down

0 comments on commit f2b8ac1

Please sign in to comment.