aboutsummaryrefslogtreecommitdiff
path: root/src/waker_ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/waker_ref.rs')
-rw-r--r--src/waker_ref.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waker_ref.rs b/src/waker_ref.rs
index 791c690..7fb552f 100644
--- a/src/waker_ref.rs
+++ b/src/waker_ref.rs
@@ -55,7 +55,7 @@ where
{
// simply copy the pointer instead of using Arc::into_raw,
// as we don't actually keep a refcount by using ManuallyDrop.<
- let ptr = (&**wake as *const W) as *const ();
+ let ptr = Arc::as_ptr(wake).cast::<()>();
let waker =
ManuallyDrop::new(unsafe { Waker::from_raw(RawWaker::new(ptr, waker_vtable::<W>())) });