Closed exrook closed 3 years ago
We were previously using io::Error and we switched to errno instead. It was annoying that io::Error does not implement PartialEq, we use it quite a lot to test that the errors returned from a functions are the expected ones.
@exrook Starting from v0.6.1 (80abb6f6264e254fb627d211f62f179ce4299c10), client code should be able to convert between io::Error
and errno::Error
seamlessly. Does this help your use case?
@exrook I'll be closing this, please re-open if it is still needed.
Is there a reason
errno::Error
is used instead ofstd::io::Error
?I've created a branch replacing
errno::Error
withio::Error
. The main changes were: replacingerrno::Error::new()
withio::Error::from_raw_os_error()
and replacingerrno::Error::last()
witherrno::Error::last_os_error()
The only major change is that
io::Error
does not implementPartialEq
so eitherErrorKind
orraw_os_error()
needs to be used to compare errors.This is a breaking change for consumers of this crate, but
io::Error
provides all the same functionality with different method names, so upgrading should be straightforward.