1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
mod std_io;
use core::fmt::Debug;
pub use std_io::*;
#[cfg(feature = "async")]
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
mod futures_io;
#[cfg(feature = "async")]
pub use futures_io::*;
fn to_io_error<T: Debug>(err: T) -> std::io::Error {
let kind = std::io::ErrorKind::Other;
std::io::Error::new(kind, format!("{:?}", err))
}
impl crate::Error for std::io::Error {
fn kind(&self) -> crate::ErrorKind {
crate::ErrorKind::Other
}
}