x.json2.decoder2: fix typos (#23018)

This commit is contained in:
Hitalo Souza 2024-12-05 17:02:33 -04:00 committed by GitHub
parent 3254987bb2
commit a3bd5c64da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -139,7 +139,7 @@ fn check_if_json_match[T](val string) ! {
return error('Expected boolean, but got ${value_kind}') return error('Expected boolean, but got ${value_kind}')
} }
} $else { } $else {
return error('cannot encode value with ${value_kind} type') return error('cannot decode value with ${value_kind} type')
} }
} }
@ -654,7 +654,7 @@ fn (mut decoder Decoder) decode_value[T](mut val T) ! {
} }
} }
} $else { } $else {
return error('cannot encode value with ${typeof(val).name} type') return error('cannot decode value with ${typeof(val).name} type')
} }
if decoder.current_node != unsafe { nil } { if decoder.current_node != unsafe { nil } {