This repository was archived by the owner on May 3, 2026. It is now read-only.
0.4.0
CHANGED
PoolRef::clonedhas been made an associated function, to avoid conflicts with wrapped methods. Where you'd previously dopoolref.cloned(pool)you'll now have to doPoolRef::cloned(pool, poolref).
ADDED
- There's now a feature flag
default_implwhich removes thePoolDefaultImpltrait and instead uses specialisation (specifically themin_specializationlanguage feature) to provide default implementations forPoolCloneandPoolDefaultfor any type implementingCloneandDefault. As this needs an unstable language feature to be enabled, it will only work on nightly rustc. PoolBoxandPoolRefnow haveinto_rawandfrom_rawfunctions, plusinto_raw_non_nullforPoolBox, which work similarly to theirBoxandRccounterparts. To accommodate this, the memory layout of the internalRefBoxstructure has changed, so that the pointer stored in aPoolBoxorPoolRefis now guaranteed to point at the boxed value.- There is now a
refpool::fakepoolmodule which provides fake versions ofPool,PoolBoxandPoolRef, the latter two being zero cost wrappers aroundBoxandRc, andPoolbeing a zero sized structure that will optimise away entirely, for situations where you may want to only optionally use the pool but want to write the same code for both situations.