mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
rlp: save one line
This commit is contained in:
parent
2d98862cd7
commit
44ca09e90a
1 changed files with 1 additions and 2 deletions
|
|
@ -450,11 +450,10 @@ func makeNilPtrDecoder(etype reflect.Type, etypeinfo *typeinfo, nilKind Kind) de
|
||||||
// Handle empty values as a nil pointer.
|
// Handle empty values as a nil pointer.
|
||||||
if kind != Byte && size == 0 {
|
if kind != Byte && size == 0 {
|
||||||
if kind != nilKind {
|
if kind != nilKind {
|
||||||
err := &decodeError{
|
return &decodeError{
|
||||||
msg: fmt.Sprintf("wrong kind of empty value (got %v, want %v)", kind, nilKind),
|
msg: fmt.Sprintf("wrong kind of empty value (got %v, want %v)", kind, nilKind),
|
||||||
typ: typ,
|
typ: typ,
|
||||||
}
|
}
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
// rearm s.Kind. This is important because the input
|
// rearm s.Kind. This is important because the input
|
||||||
// position must advance to the next value even though
|
// position must advance to the next value even though
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue