summaryrefslogtreecommitdiff
path: root/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'decode.go')
-rw-r--r--decode.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/decode.go b/decode.go
index 1e90bb1..51402e7 100644
--- a/decode.go
+++ b/decode.go
@@ -71,7 +71,7 @@ func (dec *Decoder) InputOffset() int64 { return dec.io.InputOffset() }
func (dec *Decoder) More() bool {
dec.io.Reset()
_, _, t, e := dec.io.ReadRuneType()
- dec.io.UnreadRune()
+ _ = dec.io.UnreadRune() // best effort
return e == nil && t != RuneTypeEOF
}
@@ -278,7 +278,6 @@ var (
decodableType = reflect.TypeOf((*Decodable)(nil)).Elem()
jsonUnmarshalerType = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem()
textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
- boolType = reflect.TypeOf(true)
float64Type = reflect.TypeOf(float64(0))
)
@@ -553,7 +552,7 @@ func (dec *Decoder) decode(val reflect.Value, nullOK bool) {
}
nameValPtr.Elem().SetUint(n)
default:
- dec.panicType("object", typ, &DecodeArgumentError{nameValTyp})
+ dec.panicType("object", typ, &DecodeArgumentError{Type: nameValTyp})
}
}
dec.stackPush(typ, nameValPtr.Elem())