Differentiate between InvalidData and UnexpectedEnd in std::str::Utf8Error
#32584
Labels
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
For incremental "parsing" of string data (e.g. when reading from a stream) it would be helpful to know if an error is due to invalid bytes or premature end of data.
Something like:
or something simpler, like:
As a side question, what's the preferred way for small feature requests like this one? Issue, PR, RFC or internals forum?
The text was updated successfully, but these errors were encountered: