Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/rngs/adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

//! Wrappers / adapters forming RNGs

#[cfg(feature = "std")] mod read;
mod read;
mod reseeding;

#[cfg(feature = "std")] pub use self::read::{ReadError, ReadRng};
pub use self::read::{ReadError, ReadRng};
#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]
pub use self::reseeding::ReseedingRng;
4 changes: 2 additions & 2 deletions src/rngs/adapter/reseeding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ where
}


#[cfg(all(unix, feature = "std", not(target_os = "emscripten")))]
#[cfg(all(unix, not(target_os = "emscripten")))]
mod fork {
use core::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Once;
Expand Down Expand Up @@ -316,7 +316,7 @@ mod fork {
}
}

#[cfg(not(all(unix, feature = "std", not(target_os = "emscripten"))))]
#[cfg(not(all(unix, not(target_os = "emscripten"))))]
mod fork {
pub fn get_fork_counter() -> usize {
0
Expand Down
3 changes: 2 additions & 1 deletion src/rngs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
//! [`rand_xoshiro`]: https://crates.io/crates/rand_xoshiro
//! [`rng` tag]: https://crates.io/keywords/rng

pub mod adapter;
#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]
#[cfg(feature = "std")] pub mod adapter;

pub mod mock; // Public so we don't export `StepRng` directly, making it a bit
// more clear it is intended for testing.
Expand Down