use { crate::{Arbitrary, MaxRecursionReached, Result, Unstructured}, std::sync::Mutex, }; impl<'a, A> Arbitrary<'a> for Mutex where A: Arbitrary<'a>, { fn arbitrary(u: &mut Unstructured<'a>) -> Result { Arbitrary::arbitrary(u).map(Self::new) } #[inline] fn size_hint(depth: usize) -> (usize, Option) { Self::try_size_hint(depth).unwrap_or_default() } #[inline] fn try_size_hint(depth: usize) -> Result<(usize, Option), MaxRecursionReached> { A::try_size_hint(depth) } }