aboutsummaryrefslogtreecommitdiffstats
path: root/rlp/encode.go
diff options
context:
space:
mode:
Diffstat (limited to 'rlp/encode.go')
-rw-r--r--rlp/encode.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/rlp/encode.go b/rlp/encode.go
index 689d25dd8..d80b66315 100644
--- a/rlp/encode.go
+++ b/rlp/encode.go
@@ -280,7 +280,6 @@ func (r *encReader) next() []byte {
var (
encoderInterface = reflect.TypeOf(new(Encoder)).Elem()
- emptyInterface = reflect.TypeOf(new(interface{})).Elem()
big0 = big.NewInt(0)
)
@@ -292,7 +291,7 @@ func makeWriter(typ reflect.Type) (writer, error) {
return writeEncoder, nil
case kind != reflect.Ptr && reflect.PtrTo(typ).Implements(encoderInterface):
return writeEncoderNoPtr, nil
- case typ == emptyInterface:
+ case kind == reflect.Interface:
return writeInterface, nil
case typ.AssignableTo(reflect.PtrTo(bigInt)):
return writeBigIntPtr, nil