#![cfg(feature = "rand09")]
#![deprecated(since = "3.6.0", note = "use a newer version of `rand` crate")]
use super::{Generator, RandSource, StdSystemTime};
use rand_core09::RngCore;
#[derive(Clone, Eq, PartialEq, Debug, Default)]
pub struct Adapter<T>( pub T);
impl<T: RngCore> RandSource for Adapter<T> {
fn next_u32(&mut self) -> u32 {
self.0.next_u32()
}
}
impl<T: RngCore> Generator<Adapter<T>> {
pub const fn with_rand09(rng: T) -> Self {
Self::with_rand_and_time_sources(Adapter(rng), StdSystemTime)
}
}