Merge pull request #873 from dhardy/master

Fixes regarding OsRng move
diff --git a/Cargo.toml b/Cargo.toml
index ef344a6..b87559a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -57,6 +57,8 @@
 rand_core = { path = "rand_core", version = "0.5" }
 rand_pcg = { path = "rand_pcg", version = "0.2", optional = true }
 # Do not depend on 'getrandom_package' directly; use the 'getrandom' feature!
+# This is a dependency because: we forward wasm feature flags
+# This is renamed because: we need getrandom to depend on rand_core/getrandom
 getrandom_package = { version = "0.1.1", package = "getrandom", optional = true }
 log = { version = "0.4", optional = true }
 
diff --git a/rand_os/CHANGELOG.md b/rand_os/CHANGELOG.md
index b0c6549..c80befd 100644
--- a/rand_os/CHANGELOG.md
+++ b/rand_os/CHANGELOG.md
@@ -4,7 +4,7 @@
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
-## [0.2.2] - 2019-09-02
+## [0.2.2] - 2019-08-28
 ### Changed
 - `OsRng` added to `rand_core`, rendering this crate deprecated (#863)
 
diff --git a/src/lib.rs b/src/lib.rs
index b4167c3..53b043c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -57,9 +57,6 @@
 #[cfg(all(feature="alloc", not(feature="std")))]
 extern crate alloc;
 
-#[cfg(feature = "getrandom")]
-use getrandom_package as getrandom;
-
 #[allow(unused)]
 macro_rules! trace { ($($x:tt)*) => (
     #[cfg(feature = "log")] {
diff --git a/src/rngs/std.rs b/src/rngs/std.rs
index 22e08ae..8ebe6b8 100644
--- a/src/rngs/std.rs
+++ b/src/rngs/std.rs
@@ -10,8 +10,11 @@
 
 use crate::{RngCore, CryptoRng, Error, SeedableRng};
 
-#[cfg(target_os = "emscripten")] pub(crate) use rand_hc::Hc128Core as Core;
-#[cfg(not(target_os = "emscripten"))] pub(crate) use rand_chacha::ChaCha20Core as Core;
+#[cfg(all(any(test, feature = "std"), target_os = "emscripten"))]
+pub(crate) use rand_hc::Hc128Core as Core;
+#[cfg(all(any(test, feature = "std"), not(target_os = "emscripten")))]
+pub(crate) use rand_chacha::ChaCha20Core as Core;
+
 #[cfg(target_os = "emscripten")] use rand_hc::Hc128Rng as Rng;
 #[cfg(not(target_os = "emscripten"))] use rand_chacha::ChaCha20Rng as Rng;