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