#![cfg(feature = "rand010")]
use super::{Generator, RandSource, StdSystemTime};
use rand_core010::Rng;
#[derive(Clone, Eq, PartialEq, Debug, Default)]
pub struct Adapter<T>( pub T);
impl<T: Rng> RandSource for Adapter<T> {
fn next_u32(&mut self) -> u32 {
self.0.next_u32()
}
}
impl<T: Rng> Generator<Adapter<T>> {
pub const fn with_rand010(rng: T) -> Self {
Self::with_rand_and_time_sources(Adapter(rng), StdSystemTime)
}
}