Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

0.4.0

Choose a tag to compare

@bodil bodil released this 24 Apr 11:57
· 11 commits to master since this release
v0.4.0
cffc836

CHANGED

  • PoolRef::cloned has been made an associated function, to avoid conflicts with wrapped methods. Where you'd previously do poolref.cloned(pool) you'll now have to do PoolRef::cloned(pool, poolref).

ADDED

  • There's now a feature flag default_impl which removes the PoolDefaultImpl trait and instead uses specialisation (specifically the min_specialization language feature) to provide default implementations for PoolClone and PoolDefault for any type implementing Clone and Default. As this needs an unstable language feature to be enabled, it will only work on nightly rustc.
  • PoolBox and PoolRef now have into_raw and from_raw functions, plus into_raw_non_null for PoolBox, which work similarly to their Box and Rc counterparts. To accommodate this, the memory layout of the internal RefBox structure has changed, so that the pointer stored in a PoolBox or PoolRef is now guaranteed to point at the boxed value.
  • There is now a refpool::fakepool module which provides fake versions of Pool, PoolBox and PoolRef, the latter two being zero cost wrappers around Box and Rc, and Pool being 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.