1 use crate::{Arbitrary, Result, Unstructured}; 2 3 impl<'a> Arbitrary<'a> for &'a [u8] { arbitrary(u: &mut Unstructured<'a>) -> Result<Self>4 fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> { 5 let len = u.arbitrary_len::<u8>()?; 6 u.bytes(len) 7 } 8 arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self>9 fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self> { 10 Ok(u.take_rest()) 11 } 12 13 #[inline] size_hint(_depth: usize) -> (usize, Option<usize>)14 fn size_hint(_depth: usize) -> (usize, Option<usize>) { 15 (0, None) 16 } 17 } 18