all: remove redundant conversions and import names (#21903)

This commit is contained in:
Alex Prut
2020-11-25 21:00:23 +01:00
committed by GitHub
parent f59ed3565d
commit 810f9e057d
44 changed files with 66 additions and 67 deletions

View File

@ -100,7 +100,7 @@ func (n rawNode) cache() (hashNode, bool) { panic("this should never end up in
func (n rawNode) fstring(ind string) string { panic("this should never end up in a live trie") }
func (n rawNode) EncodeRLP(w io.Writer) error {
_, err := w.Write([]byte(n))
_, err := w.Write(n)
return err
}

View File

@ -173,7 +173,7 @@ func (it *nodeIterator) LeafKey() []byte {
func (it *nodeIterator) LeafBlob() []byte {
if len(it.stack) > 0 {
if node, ok := it.stack[len(it.stack)-1].node.(valueNode); ok {
return []byte(node)
return node
}
}
panic("not at leaf")