proptest/arbitrary/_alloc/
borrow.rs1use crate::std_facade::fmt;
13use crate::std_facade::{Cow, ToOwned};
14use core::borrow::Borrow;
15
16use crate::arbitrary::{any_with, Arbitrary, SMapped};
17use crate::strategy::statics::static_map;
18
19arbitrary!(
20 [A: Arbitrary + Borrow<B>, B: ToOwned<Owned = A> + fmt::Debug + ?Sized]
21 Cow<'static, B>, SMapped<A, Self>, A::Parameters;
22 args => static_map(any_with::<A>(args), Cow::Owned)
23);
24
25lift1!([Borrow<B> + 'static, B: ToOwned<Owned = A> + fmt::Debug + ?Sized]
26 Cow<'static, B>; base => static_map(base, Cow::Owned)
27);