Sha256: 9c34832ebb99cd5e31bc5c8ffc5beb5b3fa6f7ff0226aaa1cdf8e10e6d64b324

Contents?: true

Size: 763 Bytes

Versions: 30

Compression:

Stored size: 763 Bytes

Contents

// Copyright 2018 Developers of the Rand project.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![cfg_attr(docsrs, doc(cfg(feature = "std")))]
extern crate std;

use crate::Error;
use core::convert::From;
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 {}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wasmtime-23.0.2 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-22.0.0 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-21.0.1 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-20.0.2 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-20.0.0 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-18.0.3 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-17.0.1 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-17.0.0 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-16.0.0 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-15.0.1 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-15.0.0 ./ext/cargo-vendor/getrandom-0.2.11/src/error_impls.rs
wasmtime-14.0.4 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-14.0.3 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-14.0.1 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-14.0.0 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-13.0.0 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-12.0.1 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-12.0.0 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-11.0.0 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs
wasmtime-10.0.1 ./ext/cargo-vendor/getrandom-0.2.10/src/error_impls.rs