Debian Codegraph @

.cargo/vendor/getrandom/src/error_std_impls.rs

raw
1 extern crate std;
2
3 use crate::Error;
4 use std::io;
5
6 impl From<Error> for io::Error {
7 fn from(err: Error) -> Self {
8 match err.raw_os_error() {
9 Some(errno) => io::Error::from_raw_os_error(errno),
10 None => io::Error::new(io::ErrorKind::Other, err),
11 }
12 }
13 }
14
15 impl std::error::Error for Error {}