encoding/json: internal cleanup of return values for encodeState.stringBytes and encodeState.string #11883
Labels
Milestone
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In encode.go,
type encodeState
has two methods,stringBytes
andstring
, each of which return (int, error). In both cases, the only error that is returned from the methods isnil
, and the int that is returned is never read:_, err := e.stringBytes(...)
on lines 449, 465e.string(...)
on lines 544, 546, 580, 615Return values are similarly ignored in
encode_test.go
:_, err := e.string(...)
on line 384_, err := e.stringBytes(...)
on line 390I believe these methods can simply return nothing without any change in functionality.
The text was updated successfully, but these errors were encountered: