diff --git a/fake/src/impls/std/container.rs b/fake/src/impls/std/container.rs index f18151e..b87fa7e 100644 --- a/fake/src/impls/std/container.rs +++ b/fake/src/impls/std/container.rs @@ -1,5 +1,6 @@ use crate::Dummy; use rand::Rng; +use std::borrow::Cow; use std::cell::{Cell, RefCell}; use std::ops::Deref; use std::pin::Pin; @@ -36,3 +37,12 @@ where Pin::new(T::dummy_with_rng(config, rng)) } } + +impl<'a, T, U> Dummy for Cow<'a, T> +where + T: Dummy + Clone, +{ + fn dummy_with_rng(config: &U, rng: &mut R) -> Self { + Cow::Owned(T::dummy_with_rng(config, rng)) + } +}