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