We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 709bd24 commit 0ddfe98Copy full SHA for 0ddfe98
src/error.rs
@@ -45,3 +45,14 @@ impl convert::From<nix::Error> for Error {
45
Error::Io(e.into())
46
}
47
48
+
49
+impl convert::From<Error> for io::Error {
50
+ fn from(e: Error) -> io::Error {
51
+ match e {
52
+ Error::Io(err) => err,
53
+ Error::Unexpected(err) => io::Error::new(io::ErrorKind::Unsupported, err),
54
+ Error::InvalidPath(err) => io::Error::new(io::ErrorKind::InvalidInput, err),
55
+ Error::Unsupported(err) => io::Error::new(io::ErrorKind::InvalidData, err),
56
+ }
57
58
+}
0 commit comments