Release v0.2.0
- Finalization is now optional behind the feature
finalization(enabled by default).
It's still necessary to implement theFinalizetrait, even though finalization isn't enabled, in order to avoid issues when multiple crates enables different features (see here for an example of such an issue). If finalization is not enabled, simply the implementation ofFinalizewon't ever be called. - Renamed
state::execution_counttostate::executions_count. - The
state::allocated_bytesandstate::executions_countfunctions now return aResult. - Huge improvements and optimizations (from -6% to -18%, see benchmarks).
Fixes:
- Fixed unsoundness when using
new_cyclic: it was possible to make the implementation of some methods to take a reference to partially uninitialized data when called on an invalidCc. The currently only source of invalidCcs is the parameter of the closure/function accepted bynew_cyclic, so this shouldn't affect anyone not using it. This is one of the few things that MIRI doesn't check, so it went unnoticed until now.
Internal changes:
Mark::TraceRootshas been removed andMark::TraceCountinghas been renamed toMark::Traced.- Reduced the number of calls to
stateandtry_state. - Replaced the
RefCellin the state's thread local withCells.