1# Changelog
2
3## 1.5.2
4
5- `OnceBox` API uses `Box<T>`.
6  This a breaking change to unstable API.
7
8## 1.5.1
9
10- MSRV is increased to `1.36.0`.
11- document `once_cell::race` module.
12- introduce `alloc` feature for `OnceBox`.
13- fix `OnceBox::set`.
14
15## 1.5.0
16
17- add new `once_cell::race` module for "first one wins" no_std-compatible initialization flavor.
18  The API is provisional, subject to change and is gated by the `unstable` cargo feature.
19
20## 1.4.1
21
22- upgrade `parking_lot` to `0.11.0`
23- make `sync::OnceCell<T>` pass https://doc.rust-lang.org/nomicon/dropck.html#an-escape-hatch[dropck] with `parking_lot` feature enabled.
24  This fixes a (minor) semver-incompatible changed introduced in `1.4.0`
25
26## 1.4.0
27
28- upgrade `parking_lot` to `0.10` (note that this bumps MSRV with `parking_lot` feature enabled to `1.36.0`).
29- add `OnceCell::take`.
30- upgrade crossbeam utils (private dependency) to `0.7`.
31
32## 1.3.1
33
34- remove unnecessary `F: fmt::Debug` bound from `impl fmt::Debug for Lazy<T, F>`.
35
36## 1.3.0
37
38- `Lazy<T>` now implements `DerefMut`.
39- update implementation according to the latest changes in `std`.
40
41## 1.2.0
42
43- add `sync::OnceCell::get_unchecked`.
44
45## 1.1.0
46
47- implement `Default` for `Lazy`: it creates an empty `Lazy<T>` which is initialized with `T::default` on first access.
48- add `OnceCell::get_mut`.
49
50## 1.0.2
51
52- actually add `#![no_std]` attribute if std feature is not enabled.
53
54## 1.0.1
55
56- fix unsoundness in `Lazy<T>` if the initializing function panics. Thanks [@xfix](https://github.com/xfix)!
57- implement `RefUnwindSafe` for `Lazy`.
58- share more code between `std` and `parking_lot` implementations.
59- add F.A.Q section to the docs.
60
61## 1.0.0
62
63- remove `parking_lot` from the list of default features.
64- add `std` default feature. Without `std`, only `unsync` module is supported.
65- implement `Eq` for `OnceCell`.
66- fix wrong `Sync` bound on `sync::Lazy`.
67- run the whole test suite with miri.
68
69## 0.2.7
70
71- New implementation of `sync::OnceCell` if `parking_lot` feature is disabled.
72  It now employs a hand-rolled variant of `std::sync::Once`.
73- `sync::OnceCell::get_or_try_init` works without `parking_lot` as well!
74- document the effects of `parking_lot` feature: same performance but smaller types.
75
76## 0.2.6
77
78- Updated `Lazy`'s `Deref` impl to requires only `FnOnce` instead of `Fn`
79
80## 0.2.5
81
82- `Lazy` requires only `FnOnce` instead of `Fn`
83
84## 0.2.4
85
86- nicer `fmt::Debug` implementation
87
88## 0.2.3
89
90- update `parking_lot` to `0.9.0`
91- fix stacked borrows violation in `unsync::OnceCell::get`
92- implement `Clone` for `sync::OnceCell<T> where T: Clone`
93
94## 0.2.2
95
96- add `OnceCell::into_inner` which consumes a cell and returns an option
97
98## 0.2.1
99
100- implement `sync::OnceCell::get_or_try_init` if `parking_lot` feature is enabled
101- switch internal `unsafe` implementation of `sync::OnceCell` from `Once` to `Mutex`
102- `sync::OnceCell::get_or_init` is twice as fast if cell is already initialized
103- implement `std::panic::RefUnwindSafe` and `std::panic::UnwindSafe` for `OnceCell`
104- better document behavior around panics
105
106## 0.2.0
107
108- MSRV is now 1.31.1
109- `Lazy::new` and `OnceCell::new` are now const-fns
110- `unsync_lazy` and `sync_lazy` macros are removed
111
112## 0.1.8
113
114- update crossbeam-utils to 0.6
115- enable bors-ng
116
117## 0.1.7
118
119- cells implement `PartialEq` and `From`
120- MSRV is down to 1.24.1
121- update `parking_lot` to `0.7.1`
122
123## 0.1.6
124
125- `unsync::OnceCell<T>` is `Clone` if `T` is `Clone`.
126
127## 0.1.5
128
129- No changelog until this point :(
130