Skip to content

Commit 91d2afb

Browse files
authored
chore: omit unnecessary nil check (S1009)
1 parent 69908ff commit 91d2afb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

merkletree/tree.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func newBareTree(leafs uint64) *TreeData {
7777
// Then decoding the tree, bottom-up, starting with the leafs as the amount of nodes in one level defines the amount of nodes in its parent level
7878
// NOTE that correctness of the tree is NOT validated as part of this method
7979
func DeserializeTree(tree []byte) (*TreeData, error) {
80-
if tree == nil || len(tree) < BytesInInt {
80+
if len(tree) < BytesInInt {
8181
return nil, xerrors.New("no tree encoded")
8282
}
8383
lvlSize := binary.LittleEndian.Uint64(tree[:BytesInInt])

0 commit comments

Comments
 (0)