Skip to content

Commit

Permalink
rt: context::rng for rt config
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorErin committed Feb 28, 2025
1 parent b5b17e7 commit c38d393
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tokio/src/runtime/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,7 @@ tokio_thread_local! {
}
}

#[cfg(any(
feature = "time",
feature = "macros",
all(feature = "sync", feature = "rt")
))]
#[cfg(any(feature = "time", feature = "macros", all(feature = "rt")))]
pub(crate) fn thread_rng_n(n: u32) -> u32 {
CONTEXT.with(|ctx| {
let mut rng = ctx.rng.get().unwrap_or_else(FastRand::new);
Expand Down

0 comments on commit c38d393

Please sign in to comment.