Skip to content

Commit

Permalink
Merge pull request #11 from libp2p/fix-linters
Browse files Browse the repository at this point in the history
fix go vet and staticcheck
  • Loading branch information
marten-seemann authored May 19, 2021
2 parents 71e2841 + 3d74fe1 commit c2756e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions key/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"math/big"
"math/bits"
"strings"

kbucket "github.com/libp2p/go-libp2p-kbucket"
Expand All @@ -28,15 +27,6 @@ func BytesKey(b []byte) Key {
// First bit (in each byte) is least significant.
type Key []byte

// reverseBytesBits reverses the bit-endianness of each byte in a slice.
func reverseBytesBits(blob []byte) []byte {
r := make([]byte, len(blob))
for i := range blob {
r[i] = bits.Reverse8(blob[i])
}
return r
}

func (k Key) BitAt(offset int) byte {
if k[offset/8]&(byte(1)<<(7-offset%8)) == 0 {
return 0
Expand Down
1 change: 0 additions & 1 deletion trie/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func (trie *Trie) checkInvariant(depth int, pathSoFar *triePath) *InvariantDiscr
}
}
}
panic("unreachable")
}

type triePath struct {
Expand Down

0 comments on commit c2756e5

Please sign in to comment.