Closed koivunej closed 7 years ago
Thanks for the PR! We could probably git rid of all these io compatible variants directly when parsing. There is no real reason for having them apart me not knowing io errors well. Could you make the change before merging else I'll happily do it next.
The only one of those I'd like to get rid of is std::string::FromUtf8Error
which is essentially a wrapper around std::string::Utf8Error
and the input that was incorrent. Luckily it was not used anywhere.
I think there is still value in keeping the variants for unit testing and anyone using the library in more permissive environment. I'll post another commit with the extra error removed.
Looking at the diffs again, you probably meant removing of errors::ErrorKind::Eof
in favor of the std::io::ErrorKind::UnexpectedEof
. That's now removed as well.
Thanks!!
This conversion helps when working with for example tokio-proto where
Codec
must usestd::io::Error
.