Skip to content

0.2.2

Compare
Choose a tag to compare
@radekvit radekvit released this 19 Jul 16:01
· 3 commits to main since this release

0.2.2

  • Switch TypeErasedArc and TypeErasedRc to use ManuallyDrop when converting the raw pointer into a concrete Arc<T>, Rc<T> or Weak<T> to avoid incorrect behavior in case any method we call panics. Previously, the temporary would be dropped even if it shouldn't have, causing potential UB (use after free).
  • Add Prc::try_from_rc, Prc::try_project, Parc::try_from_arc, and Parc::try_project. These are fallible versions of the same methods without try_, where the FnOnce that's passed to these functions returns an Option. This allows for using Prc and Parc where the projected reference might be unavailable.