Skip to content

Commit

Permalink
Update the weak ptr support for newer Rust
Browse files Browse the repository at this point in the history
The name of the method changed in std (unstable features and such).
  • Loading branch information
vorner committed Apr 21, 2020
1 parent 88fc681 commit 8a93bb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/weak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::RefCnt;
unsafe impl<T> RefCnt for Weak<T> {
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
Expand All @@ -19,7 +19,7 @@ unsafe impl<T> RefCnt for Weak<T> {
unsafe impl<T> RefCnt for RcWeak<T> {
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
Expand Down

0 comments on commit 8a93bb5

Please sign in to comment.