1 2 3 4 5 6 7 8 9 10 11
use arbitrary::Unstructured; use rand::RngCore; pub fn rand_u<'a>(buf: &'a mut [u8]) -> Unstructured<'a> { let mut rng = rand::rng(); rng.fill_bytes(buf); Unstructured::new(buf) } #[allow(dead_code)] fn main() {}