-
The MSRV is now 1.61.
-
Storagewas renamed toInitCell.The type was renamed to more accurately reflect its intended use and be more consistent with naming across the ecosystem. Several method names were also changed accordingly:
Storage::get_or_set()was renamed toInitCell::get_or_init().Storage::set_or_get()was renamed toInitCell::set_or_init().
Along with naming changes, the following improvements were made:
InitCell<T>can be constructed and used even withT: !Sync + !Send.InitCell<T>implsSendeven whenT: !Sync.- Added
InitCell::{wait, reset, take, update}()methods.
-
LocalStoragewas renamed toLocalInitCell.No other changes were made to the API.
-
Containerwas renamed toTypeMap.The type was renamed to more accurately reflect its intended use and be more consistent with naming across the ecosystem. The following changes were also made:
Container![]is neitherSyncnorSend.- An internal implementation detail was modified to more thoroughly ensure
forwards-compatibility with Rust releases. This resulted in several uses of
unsafebeing removed at the cost of raising the MSRV to 1.61.
- The crate now uses edition 2021.
LocalInitCell::try_get()no longer panics when thread-local storage is not available.