14 lines
278 B
Rust
14 lines
278 B
Rust
extern crate std;
|
|
|
|
use crate::Error;
|
|
use std::io;
|
|
|
|
impl From<Error> for io::Error {
|
|
fn from(err: Error) -> Self {
|
|
match err.raw_os_error() {
|
|
Some(errno) => io::Error::from_raw_os_error(errno),
|
|
None => io::Error::other(err),
|
|
}
|
|
}
|
|
}
|