all: remove unneeded parentheses (#21921)

* remove uneeded convertion type

* remove redundant type in composite literal

* omit explicit type where implicit

* remove unused redundant parenthesis

* remove redundant import alias duktape
This commit is contained in:
Alex Prut
2021-02-02 10:32:44 +01:00
committed by GitHub
parent 4eae0c6b6f
commit ef84da8481
15 changed files with 23 additions and 23 deletions

View File

@ -38,7 +38,7 @@ type trieKV struct {
type (
// trieGeneratorFn is the interface of trie generation which can
// be implemented by different trie algorithm.
trieGeneratorFn func(in chan (trieKV), out chan (common.Hash))
trieGeneratorFn func(in chan trieKV, out chan common.Hash)
// leafCallbackFn is the callback invoked at the leaves of the trie,
// returns the subtrie root with the specified subtrie identifier.
@ -266,7 +266,7 @@ func generateTrieRoot(it Iterator, account common.Hash, generatorFn trieGenerato
// stdGenerate is a very basic hexary trie builder which uses the same Trie
// as the rest of geth, with no enhancements or optimizations
func stdGenerate(in chan (trieKV), out chan (common.Hash)) {
func stdGenerate(in chan trieKV, out chan common.Hash) {
t, _ := trie.New(common.Hash{}, trie.NewDatabase(memorydb.New()))
for leaf := range in {
t.TryUpdate(leaf.key[:], leaf.value)

View File

@ -500,7 +500,7 @@ func DisabledTestEipExampleCases(t *testing.T) {
{
code := []byte{
byte(vm.PUSH9), 0x00, 0x00, 0x00, 0x00, 0x0, 0x00, 0x00, 0x00, (4 + 8),
byte(vm.PUSH9), 0x00, 0x00, 0x00, 0x00, 0x0, 0x00, 0x00, 0x00, 4 + 8,
byte(vm.JUMPSUB),
byte(vm.STOP),
byte(vm.BEGINSUB),
@ -516,7 +516,7 @@ func DisabledTestEipExampleCases(t *testing.T) {
// out the trace.
{
code := []byte{
byte(vm.PUSH9), 0x01, 0x00, 0x00, 0x00, 0x0, 0x00, 0x00, 0x00, (4 + 8),
byte(vm.PUSH9), 0x01, 0x00, 0x00, 0x00, 0x0, 0x00, 0x00, 0x00, 4 + 8,
byte(vm.JUMPSUB),
byte(vm.STOP),
byte(vm.BEGINSUB),