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