- upgrade
parking_lot
to0.10
(note that this bumps MSRV withparking_lot
feature enabled to1.36.0
). - add
OnceCell::take
. - upgrade crossbeam utils (private dependency) to
0.7
.
- remove unnecessary
F: fmt::Debug
bound fromimpl fmt::Debug for Lazy<T, F>
.
Lazy<T>
now implementsDerefMut
.- update implementation according to the latest changes in
std
.
- add
sync::OnceCell::get_unchecked
.
- implement
Default
forLazy
: it creates an emptyLazy<T>
which is initialized withT::default
on first access. - add
OnceCell::get_mut
.
- actually add
#![no_std]
attribute if std feature is not enabled.
- fix unsoundness in
Lazy<T>
if the initializing function panics. Thanks @xfix! - implement
RefUnwindSafe
forLazy
. - share more code between
std
andparking_lot
implementations. - add F.A.Q section to the docs.
- remove
parking_lot
from the list of default features. - add
std
default feature. Withoutstd
, onlyunsync
module is supported. - implement
Eq
forOnceCell
. - fix wrong
Sync
bound onsync::Lazy
. - run the whole test suite with miri.
- New implementation of
sync::OnceCell
ifparking_lot
feature is disabled. It now employs a hand-rolled variant ofstd::sync::Once
. sync::OnceCell::get_or_try_init
works withoutparking_lot
as well!- document the effects of
parking_lot
feature: same performance but smaller types.
- Updated
Lazy
'sDeref
impl to requires onlyFnOnce
instead ofFn
Lazy
requires onlyFnOnce
instead ofFn
- nicer
fmt::Debug
implementation
- update
parking_lot
to0.9.0
- fix stacked borrows violation in
unsync::OnceCell::get
- implement
Clone
forsync::OnceCell<T> where T: Clone
- add
OnceCell::into_inner
which consumes a cell and returns an option
- implement
sync::OnceCell::get_or_try_init
ifparking_lot
feature is enabled - switch internal
unsafe
implementation ofsync::OnceCell
fromOnce
toMutex
sync::OnceCell::get_or_init
is twice as fast if cell is already initialized- implement
std::panic::RefUnwindSafe
andstd::panic::UnwindSafe
forOnceCell
- better document behavior around panics
- MSRV is now 1.31.1
Lazy::new
andOnceCell::new
are now const-fnsunsync_lazy
andsync_lazy
macros are removed
- update crossbeam-utils to 0.6
- enable bors-ng
- cells implement
PartialEq
andFrom
- MSRV is down to 1.24.1
- update
parking_lot
to0.7.1
unsync::OnceCell<T>
isClone
ifT
isClone
.
- No changelog until this point :(