From 8a93bb50a59f40042d66768e919a6e9135ec0db3 Mon Sep 17 00:00:00 2001 From: Michal 'vorner' Vaner Date: Tue, 21 Apr 2020 08:22:22 +0200 Subject: [PATCH] Update the weak ptr support for newer Rust The name of the method changed in std (unstable features and such). --- src/weak.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/weak.rs b/src/weak.rs index f13fa02..1f6d593 100644 --- a/src/weak.rs +++ b/src/weak.rs @@ -6,7 +6,7 @@ use crate::RefCnt; unsafe impl RefCnt for Weak { type Base = T; fn as_ptr(me: &Self) -> *mut T { - Weak::as_raw(me) as *mut T + Weak::as_ptr(me) as *mut T } fn into_ptr(me: Self) -> *mut T { Weak::into_raw(me) as *mut T @@ -19,7 +19,7 @@ unsafe impl RefCnt for Weak { unsafe impl RefCnt for RcWeak { type Base = T; fn as_ptr(me: &Self) -> *mut T { - RcWeak::as_raw(me) as *mut T + RcWeak::as_ptr(me) as *mut T } fn into_ptr(me: Self) -> *mut T { RcWeak::into_raw(me) as *mut T