- Change the API of
try_*
functions onParc
andPrc
to take functions returningResult
instead ofOption
and make them returnResult
instead ofOption
.
- Factor out the vtable to be shared between the
sync
andprc
modules, as the type definition is identical - Fix tests that should fail and check that we're failing for the right reason on nightly
- Remove lifetime bounds from
Parc
andPrc
signatures where the default lifetime bounds are otherwise identical - Improve internal naming of structures and their fields
- Increase test coverage to cover as much as possible
- Switch
TypeErasedArc
andTypeErasedRc
to useManuallyDrop
when converting the raw pointer into a concreteArc<T>
,Rc<T>
orWeak<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
, andParc::try_project
. These are fallible versions of the same methods withouttry_
, where theFnOnce
that's passed to these functions returns anOption
. This allows for usingPrc
andParc
where the projected reference might be unavailable.
- Fix incorrect lifetime bounds on
Prc::from_rc
andParc::from_arc
.
- Fix the soundness issue from 0.1.0 by requiring that any
T
returned by any projecting function isT: 'static
. This change technically restricts the types we can use withPrc
andParc
, but doesn't interfere with any intended usage of the crate.
(yanked due to flipped bounds on project
functions causing a soundness hole)
Initial release.
(yanked due to a soundness hole where it was possible to use a reference to a reference that didn't live long enough)