diff options
Diffstat (limited to 'vendor/yoke/src/zero_from.rs')
-rw-r--r-- | vendor/yoke/src/zero_from.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/yoke/src/zero_from.rs b/vendor/yoke/src/zero_from.rs index 679a28d59..d876d9c06 100644 --- a/vendor/yoke/src/zero_from.rs +++ b/vendor/yoke/src/zero_from.rs @@ -26,6 +26,7 @@ where Y: for<'a> Yokeable<'a>, for<'a> YokeTraitHack<<Y as Yokeable<'a>>::Output>: ZeroFrom<'a, <C as Deref>::Target>, C: StableDeref + Deref, + <C as Deref>::Target: 'static, { /// Construct a [`Yoke`]`<Y, C>` from a cart implementing `StableDeref` by zero-copy cloning /// the cart to `Y` and then yokeing that object to the cart. @@ -42,7 +43,9 @@ where /// use std::borrow::Cow; /// use yoke::Yoke; /// - /// let yoke = Yoke::<Cow<'static, str>, String>::attach_to_zero_copy_cart("demo".to_string()); + /// let yoke = Yoke::<Cow<'static, str>, String>::attach_to_zero_copy_cart( + /// "demo".to_owned(), + /// ); /// /// assert_eq!("demo", yoke.get()); /// ``` |