From 44ca09e90a713dbc9a6af79fe930a6b90e9a9be8 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 12 Sep 2019 17:29:00 +0200 Subject: [PATCH] rlp: save one line --- rlp/decode.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rlp/decode.go b/rlp/decode.go index 9850458141..524395915d 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -450,11 +450,10 @@ func makeNilPtrDecoder(etype reflect.Type, etypeinfo *typeinfo, nilKind Kind) de // Handle empty values as a nil pointer. if kind != Byte && size == 0 { if kind != nilKind { - err := &decodeError{ + return &decodeError{ msg: fmt.Sprintf("wrong kind of empty value (got %v, want %v)", kind, nilKind), typ: typ, } - return err } // rearm s.Kind. This is important because the input // position must advance to the next value even though