This commit makes a few minor changes to how IO error handling works.
Throughout procfs, we try to always keep track of what Path is
associated with an IO error. This is done via the IoErrorWrapper
struct and the wrap_io_error! macro.
The IoErrorWrapper inner error is no longer optional, which should
save a boxing.
When constructing an ProcError from a std::io::Error, the inner
IoErrorWrapper is removed if present, and the actual underlying IO
Error is used instead. This makes it possible to inspect the details of
that underlying error.
Also, the ESRCH error is now mapped to the ProcError::NotFound error,
for convenience.
This commit makes a few minor changes to how IO error handling works.
Throughout procfs, we try to always keep track of what Path is associated with an IO error. This is done via the
IoErrorWrapper
struct and thewrap_io_error!
macro.The
IoErrorWrapper
inner error is no longer optional, which should save a boxing.When constructing an
ProcError
from astd::io::Error
, the innerIoErrorWrapper
is removed if present, and the actual underlying IO Error is used instead. This makes it possible to inspect the details of that underlying error.Also, the ESRCH error is now mapped to the
ProcError::NotFound
error, for convenience.Closes #208