diff options
author | Daniel Mueller <deso@posteo.net> | 2019-01-16 17:26:30 -0800 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-01-16 17:26:30 -0800 |
commit | 8350ac6afb2d678b74581000a6aafe1994b72231 (patch) | |
tree | 2330da01a806921b3849c9e64d2b9f506495e2c0 /rand/src/deprecated.rs | |
parent | d6652b913b33e432a748187f9f5623cec1e9926e (diff) | |
download | nitrocli-8350ac6afb2d678b74581000a6aafe1994b72231.tar.gz nitrocli-8350ac6afb2d678b74581000a6aafe1994b72231.tar.bz2 |
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
Diffstat (limited to 'rand/src/deprecated.rs')
-rw-r--r-- | rand/src/deprecated.rs | 79 |
1 files changed, 6 insertions, 73 deletions
diff --git a/rand/src/deprecated.rs b/rand/src/deprecated.rs index 985ae61..88eb09f 100644 --- a/rand/src/deprecated.rs +++ b/rand/src/deprecated.rs @@ -151,12 +151,12 @@ impl SeedableRng for ChaChaRng { } impl ChaChaRng { - #[cfg(rust_1_26)] + #[cfg(all(rustc_1_26, not(target_os = "emscripten")))] pub fn get_word_pos(&self) -> u128 { self.0.get_word_pos() } - #[cfg(rust_1_26)] + #[cfg(all(rustc_1_26, not(target_os = "emscripten")))] pub fn set_word_pos(&mut self, word_offset: u128) { self.0.set_word_pos(word_offset) } @@ -291,45 +291,12 @@ impl SeedableRng for StdRng { impl CryptoRng for StdRng {} -#[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)] #[deprecated(since="0.6.0", note="import with rand::rngs::OsRng instead")] pub struct OsRng(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="std")] +#[cfg(feature="rand_os")] impl RngCore for OsRng { #[inline(always)] fn next_u32(&mut self) -> u32 { @@ -352,48 +319,14 @@ impl RngCore for 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="std")] +#[cfg(feature="rand_os")] impl OsRng { pub fn new() -> Result<Self, Error> { rngs::OsRng::new().map(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="std")] +#[cfg(feature="rand_os")] impl CryptoRng for OsRng {} |