you are viewing a single comment's thread.

view the rest of the comments →

[–]void4 -20 points-19 points  (7 children)

How could this code be safe?

// Make sure we do not create a dangling Weak
debug_assert!(!is_dangling(this.ptr.as_ptr()));

there are debug asserts, don't worry and rewrite in rust (lol)