1#![cfg_attr(docsrs, doc(cfg(feature = "std")))]
2extern crate std;
3
4use crate::Error;
5use core::convert::From;
6use std::io;
7
8impl From<Error> for io::Error {
9 fn from(err: Error) -> Self {
10 match err.raw_os_error() {
11 Some(errno: i32) => io::Error::from_raw_os_error(code:errno),
12 None => io::Error::new(kind:io::ErrorKind::Other, error:err),
13 }
14 }
15}
16
17impl std::error::Error for Error {}
18