]> git.proxmox.com Git - rustc.git/blob - vendor/arrayvec/CHANGELOG.md
New upstream version 1.55.0+dfsg1
[rustc.git] / vendor / arrayvec / CHANGELOG.md
1 Recent Changes (arrayvec)
2 =========================
3
4 ## 0.7.1
5
6 - Add new ArrayVec methods `.take()` and `.into_inner_unchecked()` by @conradludgate
7 - `clone_from` now uses `truncate` when needed by @a1phyr
8
9 ## 0.7.0
10
11 - `fn new_const` is now the way to const-construct arrayvec and arraystring,
12 and `fn new` has been reverted to a regular "non-const" function.
13 This works around performance issue #182, where the const fn version did not
14 optimize well. Change by @bluss with thanks to @rodrimati1992 and @niklasf
15 for analyzing the problem.
16
17 - The deprecated feature flag `unstable-const-fn` was removed, since it's not needed
18
19 - Optimize `.retain()` by using the same algorithm as in std, change by @niklasf,
20 issue #174. Original optimization in Rust std by @oxalica in rust-lang/rust/pull/81126
21
22 ## 0.6.1
23
24 - The ``ArrayVec::new`` and ``ArrayString::new`` constructors are properly
25 const fns on stable and the feature flag ``unstable-const-fn`` is now deprecated.
26 by @rodrimati1992
27
28 - Small fix to the capacity check macro by @Xaeroxe
29 - Typo fix in documentation by @cuviper
30 - Small code cleanup by @bluss
31
32 ## 0.6.0
33
34 - The **const generics** release 🎉. Arrayvec finally implements what it
35 wanted to implement, since its first version: a vector backed by an array,
36 with generic parameters for the arbitrary element type *and* backing array
37 capacity.
38
39 The New type syntax is `ArrayVec<T, CAP>` where `CAP` is the arrayvec capacity.
40 For arraystring the syntax is `ArrayString<CAP>`.
41
42 Length is stored internally as u32; this limits the maximum capacity. The size
43 of the `ArrayVec` or `ArrayString` structs for the same capacity may grow
44 slightly compared with the previous version (depending on padding requirements
45 for the element type). Change by @bluss.
46
47 - Arrayvec's `.extend()` and `FromIterator`/`.collect()` to arrayvec now
48 **panic** if the capacity of the arrayvec is exceeded. Change by @bluss.
49
50 - Arraystring now implements `TryFrom<&str>` and `TryFrom<fmt::Arguments>` by
51 @c410-f3r
52
53 - Minimum supported rust version is Rust 1.51
54
55 ## 0.5.2
56
57 - Add `is_empty` methods for ArrayVec and ArrayString by @nicbn
58 - Implement `TryFrom<Slice>` for ArrayVec by @paulkernfeld
59 - Add `unstable-const-fn` to make `new` methods const by @m-ou-se
60 - Run miri in CI and a few related fixes by @RalfJung
61 - Fix outdated comment by @Phlosioneer
62 - Move changelog to a separate file by @Luro02
63 - Remove deprecated `Error::description` by @AnderEnder
64 - Use pointer method `add` by @hbina
65
66 ## 0.5.1
67
68 - Add `as_ptr`, `as_mut_ptr` accessors directly on the `ArrayVec` by @tbu-
69 (matches the same addition to `Vec` which happened in Rust 1.37).
70 - Add method `ArrayString::len` (now available directly, not just through deref to str).
71 - Use raw pointers instead of `&mut [u8]` for encoding chars into `ArrayString`
72 (uninit best practice fix).
73 - Use raw pointers instead of `get_unchecked_mut` where the target may be
74 uninitialized everywhere relevant in the ArrayVec implementation
75 (uninit best practice fix).
76 - Changed inline hints on many methods, mainly removing inline hints
77 - `ArrayVec::dispose` is now deprecated (it has no purpose anymore)
78
79 ## 0.4.12
80
81 - Use raw pointers instead of `get_unchecked_mut` where the target may be
82 uninitialized everywhere relevant in the ArrayVec implementation.
83
84 ## 0.5.0
85
86 - Use `MaybeUninit` (now unconditionally) in the implementation of
87 `ArrayVec`
88 - Use `MaybeUninit` (now unconditionally) in the implementation of
89 `ArrayString`
90 - The crate feature for serde serialization is now named `serde`.
91 - Updated the `Array` trait interface, and it is now easier to use for
92 users outside the crate.
93 - Add `FromStr` impl for `ArrayString` by @despawnerer
94 - Add method `try_extend_from_slice` to `ArrayVec`, which is always
95 effecient by @Thomasdezeeuw.
96 - Add method `remaining_capacity` by @Thomasdezeeuw
97 - Improve performance of the `extend` method.
98 - The index type of zero capacity vectors is now itself zero size, by
99 @clarfon
100 - Use `drop_in_place` for truncate and clear methods. This affects drop order
101 and resume from panic during drop.
102 - Use Rust 2018 edition for the implementation
103 - Require Rust 1.36 or later, for the unconditional `MaybeUninit`
104 improvements.
105
106 ## Older releases
107
108 - 0.4.11
109
110 - In Rust 1.36 or later, use newly stable `MaybeUninit`. This extends the
111 soundness work introduced in 0.4.9, we are finally able to use this in
112 stable. We use feature detection (build script) to enable this at build
113 time.
114
115 - 0.4.10
116
117 - Use `repr(C)` in the `union` version that was introduced in 0.4.9, to
118 allay some soundness concerns.
119
120 - 0.4.9
121
122 - Use `union` in the implementation on when this is detected to be supported
123 (nightly only for now). This is a better solution for treating uninitialized
124 regions correctly, and we'll use it in stable Rust as soon as we are able.
125 When this is enabled, the `ArrayVec` has no space overhead in its memory
126 layout, although the size of the vec should not be relied upon. (See [#114](https://github.com/bluss/arrayvec/pull/114))
127 - `ArrayString` updated to not use uninitialized memory, it instead zeros its
128 backing array. This will be refined in the next version, since we
129 need to make changes to the user visible API.
130 - The `use_union` feature now does nothing (like its documentation foretold).
131
132
133 - 0.4.8
134
135 - Implement Clone and Debug for `IntoIter` by @clarcharr
136 - Add more array sizes under crate features. These cover all in the range
137 up to 128 and 129 to 255 respectively (we have a few of those by default):
138
139 - `array-size-33-128`
140 - `array-size-129-255`
141
142 - 0.4.7
143
144 - Fix future compat warning about raw pointer casts
145 - Use `drop_in_place` when dropping the arrayvec by-value iterator
146 - Decrease mininum Rust version (see docs) by @jeehoonkang
147
148 - 0.3.25
149
150 - Fix future compat warning about raw pointer casts
151
152 - 0.4.6
153
154 - Fix compilation on 16-bit targets. This means, the 65536 array size is not
155 included on these targets.
156
157 - 0.3.24
158
159 - Fix compilation on 16-bit targets. This means, the 65536 array size is not
160 included on these targets.
161 - Fix license files so that they are both included (was fixed in 0.4 before)
162
163 - 0.4.5
164
165 - Add methods to `ArrayString` by @DenialAdams:
166
167 - `.pop() -> Option<char>`
168 - `.truncate(new_len)`
169 - `.remove(index) -> char`
170
171 - Remove dependency on crate odds
172 - Document debug assertions in unsafe methods better
173
174 - 0.4.4
175
176 - Add method `ArrayVec::truncate()` by @niklasf
177
178 - 0.4.3
179
180 - Improve performance for `ArrayVec::extend` with a lower level
181 implementation (#74)
182 - Small cleanup in dependencies (use no std for crates where we don't need more)
183
184 - 0.4.2
185
186 - Add constructor method `new` to `CapacityError`.
187
188 - 0.4.1
189
190 - Add `Default` impl to `ArrayString` by @tbu-
191
192 - 0.4.0
193
194 - Reformed signatures and error handling by @bluss and @tbu-:
195
196 - `ArrayVec`'s `push, insert, remove, swap_remove` now match `Vec`'s
197 corresponding signature and panic on capacity errors where applicable.
198 - Add fallible methods `try_push, insert` and checked methods
199 `pop_at, swap_pop`.
200 - Similar changes to `ArrayString`'s push methods.
201
202 - Use a local version of the `RangeArgument` trait
203 - Add array sizes 50, 150, 200 by @daboross
204 - Support serde 1.0 by @daboross
205 - New method `.push_unchecked()` by @niklasf
206 - `ArrayString` implements `PartialOrd, Ord` by @tbu-
207 - Require Rust 1.14
208 - crate feature `use_generic_array` was dropped.
209
210 - 0.3.23
211
212 - Implement `PartialOrd, Ord` as well as `PartialOrd<str>` for
213 `ArrayString`.
214
215 - 0.3.22
216
217 - Implement `Array` for the 65536 size
218
219 - 0.3.21
220
221 - Use `encode_utf8` from crate odds
222 - Add constructor `ArrayString::from_byte_string`
223
224 - 0.3.20
225
226 - Simplify and speed up `ArrayString`’s `.push(char)`-
227
228 - 0.3.19
229
230 - Add new crate feature `use_generic_array` which allows using their
231 `GenericArray` just like a regular fixed size array for the storage
232 of an `ArrayVec`.
233
234 - 0.3.18
235
236 - Fix bounds check in `ArrayVec::insert`!
237 It would be buggy if `self.len() < index < self.capacity()`. Take note of
238 the push out behavior specified in the docs.
239
240 - 0.3.17
241
242 - Added crate feature `use_union` which forwards to the nodrop crate feature
243 - Added methods `.is_full()` to `ArrayVec` and `ArrayString`.
244
245 - 0.3.16
246
247 - Added method `.retain()` to `ArrayVec`.
248 - Added methods `.as_slice(), .as_mut_slice()` to `ArrayVec` and `.as_str()`
249 to `ArrayString`.
250
251 - 0.3.15
252
253 - Add feature std, which you can opt out of to use `no_std` (requires Rust 1.6
254 to opt out).
255 - Implement `Clone::clone_from` for ArrayVec and ArrayString
256
257 - 0.3.14
258
259 - Add `ArrayString::from(&str)`
260
261 - 0.3.13
262
263 - Added `DerefMut` impl for `ArrayString`.
264 - Added method `.simplify()` to drop the element for `CapacityError`.
265 - Added method `.dispose()` to `ArrayVec`
266
267 - 0.3.12
268
269 - Added ArrayString, a fixed capacity analogy of String
270
271 - 0.3.11
272
273 - Added trait impls Default, PartialOrd, Ord, Write for ArrayVec
274
275 - 0.3.10
276
277 - Go back to using external NoDrop, fixing a panic safety bug (issue #3)
278
279 - 0.3.8
280
281 - Inline the non-dropping logic to remove one drop flag in the
282 ArrayVec representation.
283
284 - 0.3.7
285
286 - Added method .into_inner()
287 - Added unsafe method .set_len()