From 8350ac6afb2d678b74581000a6aafe1994b72231 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Wed, 16 Jan 2019 17:26:30 -0800 Subject: Update nitrokey crate to 0.3.3 This change updates the nitrokey crate to version 0.3.3. Along with that change we update rand to 0.6.4 because rand 0.6.1 does not yet contain a publicly accessible rand_os. Note that we no longer require all crates in rand's workspace, but only rand_os and rand_core, which is a significant reduction in the number of lines of code compiled. Import subrepo nitrokey/:nitrokey at 7cf747d56ddc0b7eeedc3caf36dcc909907a171c Import subrepo rand/:rand at 4336232dda03323634b10ec72ddf27914aebc3a2 --- rand/src/rngs/entropy.rs | 54 +++--------------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) (limited to 'rand/src/rngs/entropy.rs') diff --git a/rand/src/rngs/entropy.rs b/rand/src/rngs/entropy.rs index 8736324..372b4d7 100644 --- a/rand/src/rngs/entropy.rs +++ b/rand/src/rngs/entropy.rs @@ -191,43 +191,11 @@ impl EntropySource for NoSource { } -#[cfg(all(feature="std", - any(target_os = "linux", target_os = "android", - target_os = "netbsd", - target_os = "dragonfly", - target_os = "haiku", - target_os = "emscripten", - target_os = "solaris", - target_os = "cloudabi", - target_os = "macos", target_os = "ios", - target_os = "freebsd", - target_os = "openbsd", target_os = "bitrig", - target_os = "redox", - target_os = "fuchsia", - windows, - all(target_arch = "wasm32", feature = "stdweb"), - all(target_arch = "wasm32", feature = "wasm-bindgen"), -)))] +#[cfg(feature="rand_os")] #[derive(Clone, Debug)] pub struct Os(rngs::OsRng); -#[cfg(all(feature="std", - any(target_os = "linux", target_os = "android", - target_os = "netbsd", - target_os = "dragonfly", - target_os = "haiku", - target_os = "emscripten", - target_os = "solaris", - target_os = "cloudabi", - target_os = "macos", target_os = "ios", - target_os = "freebsd", - target_os = "openbsd", target_os = "bitrig", - target_os = "redox", - target_os = "fuchsia", - windows, - all(target_arch = "wasm32", feature = "stdweb"), - all(target_arch = "wasm32", feature = "wasm-bindgen"), -)))] +#[cfg(feature="rand_os")] impl EntropySource for Os { fn new_and_fill(dest: &mut [u8]) -> Result { let mut rng = rngs::OsRng::new()?; @@ -240,23 +208,7 @@ impl EntropySource for Os { } } -#[cfg(not(all(feature="std", - any(target_os = "linux", target_os = "android", - target_os = "netbsd", - target_os = "dragonfly", - target_os = "haiku", - target_os = "emscripten", - target_os = "solaris", - target_os = "cloudabi", - target_os = "macos", target_os = "ios", - target_os = "freebsd", - target_os = "openbsd", target_os = "bitrig", - target_os = "redox", - target_os = "fuchsia", - windows, - all(target_arch = "wasm32", feature = "stdweb"), - all(target_arch = "wasm32", feature = "wasm-bindgen"), -))))] +#[cfg(not(feature="std"))] type Os = NoSource; -- cgit v1.2.1