-
The MSRV is now 1.61.
-
Storage
was 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>
implsSend
even whenT: !Sync
.- Added
InitCell::{wait, reset, take, update}()
methods.
-
LocalStorage
was renamed toLocalInitCell
.No other changes were made to the API.
-
Container
was 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 neitherSync
norSend
.- An internal implementation detail was modified to more thoroughly ensure
forwards-compatibility with Rust releases. This resulted in several uses of
unsafe
being 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.