use crate::notes::memo::Memo; use proptest::{arbitrary::any, collection::vec, prelude::*}; impl Arbitrary for Memo { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { (vec(any::(), 512)) .prop_map(|v| { let mut bytes = [0; 512]; bytes.copy_from_slice(v.as_slice()); Memo(Box::new(bytes)) }) .boxed() } type Strategy = BoxedStrategy; }