#![cfg(feature = "rand010")]
use super::{RandSource, V7Generator};
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()
}
fn next_u64(&mut self) -> u64 {
self.0.next_u64()
}
}
impl<T: Rng> V7Generator<Adapter<T>> {
pub const fn with_rand010(rng: T) -> Self {
Self::new(Adapter(rng))
}
}