diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /vendor/yoke/src/zero_from.rs | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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()); /// ``` |