diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-02 18:36:06 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-02 18:36:06 -0600 |
| commit | 8cdfa445d6629ffef4cb84967ff7017654045bc2 (patch) | |
| tree | 22f0b0907c024c78d26a731e2e1f5219407d8102 /vendor/getrandom/src/error_std_impls.rs | |
| parent | 4351c74c7c5f97156bc94d3a8549b9940ac80e3f (diff) | |
chore: add vendor directory
Diffstat (limited to 'vendor/getrandom/src/error_std_impls.rs')
| -rw-r--r-- | vendor/getrandom/src/error_std_impls.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/getrandom/src/error_std_impls.rs b/vendor/getrandom/src/error_std_impls.rs new file mode 100644 index 00000000..2c326012 --- /dev/null +++ b/vendor/getrandom/src/error_std_impls.rs @@ -0,0 +1,15 @@ +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::new(io::ErrorKind::Other, err), + } + } +} + +impl std::error::Error for Error {} |
