From ae7b6fc5b37077332940d29cfe0f3d81992cf7fa Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 15 Jan 2024 17:05:29 +0100 Subject: [PATCH] And one more --- src/datatypes/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/datatypes/mod.rs b/src/datatypes/mod.rs index 91e4f3bc15..f2c5e71db4 100644 --- a/src/datatypes/mod.rs +++ b/src/datatypes/mod.rs @@ -37,18 +37,18 @@ pub trait ArcExt { /// let ptr = inner.as_ptr(); /// /// let arc = Arc::new(inner); - /// let inner = Arc::unwrap_or_clone(arc); + /// let inner = ArcExt::unwrap_or_clone_polyfill(arc); /// // The inner value was not cloned /// assert!(ptr::eq(ptr, inner.as_ptr())); /// /// let arc = Arc::new(inner); /// let arc2 = arc.clone(); - /// let inner = Arc::unwrap_or_clone(arc); + /// let inner = ArcExt::unwrap_or_clone_polyfill(arc); /// // Because there were 2 references, we had to clone the inner value. /// assert!(!ptr::eq(ptr, inner.as_ptr())); /// // `arc2` is the last reference, so when we unwrap it we get back /// // the original `String`. - /// let inner = Arc::unwrap_or_clone(arc2); + /// let inner = ArcExt::unwrap_or_clone_polyfill(arc2); /// assert!(ptr::eq(ptr, inner.as_ptr())); /// ``` fn unwrap_or_clone_polyfill(this: Self) -> T;