forked from cerc-io/plugeth
all: simplify nested complexity and if blocks ending with a return statement (#21854)
Changes:
Simplify nested complexity
If an if blocks ends with a return statement then remove the else nesting.
Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint
This commit is contained in:
+1
-2
@@ -39,9 +39,8 @@ func (e *testEncoder) EncodeRLP(w io.Writer) error {
|
||||
}
|
||||
if e.err != nil {
|
||||
return e.err
|
||||
} else {
|
||||
w.Write([]byte{0, 1, 0, 1, 0, 1, 0, 1, 0, 1})
|
||||
}
|
||||
w.Write([]byte{0, 1, 0, 1, 0, 1, 0, 1, 0, 1})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user