arbitrary/foreign/core/slice.rs
use crate::{Arbitrary, Result, Unstructured};
impl<'a> Arbitrary<'a> for &'a [u8] {
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
let len = u.arbitrary_len::<u8>()?;
u.bytes(len)
}
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self> {
Ok(u.take_rest())
}
#[inline]
fn size_hint(_depth: usize) -> (usize, Option<usize>) {
(0, None)
}
}