1 2arrayvec 3======== 4 5A vector with fixed capacity. 6 7Please read the `API documentation here`__ 8 9__ https://docs.rs/arrayvec 10 11|build_status|_ |crates|_ |crates2|_ 12 13.. |build_status| image:: https://travis-ci.org/bluss/arrayvec.svg 14.. _build_status: https://travis-ci.org/bluss/arrayvec 15 16.. |crates| image:: http://meritbadge.herokuapp.com/arrayvec 17.. _crates: https://crates.io/crates/arrayvec 18 19.. |crates2| image:: http://meritbadge.herokuapp.com/nodrop 20.. _crates2: https://crates.io/crates/nodrop 21 22Recent Changes (arrayvec) 23------------------------- 24 25- 0.4.12 26 27 - Use raw pointers instead of ``get_unchecked_mut`` where the target may be 28 uninitialized a everywhere relevant in the ArrayVec implementation. 29 30- 0.4.11 31 32 - In Rust 1.36 or later, use newly stable MaybeUninit. This extends the 33 soundness work introduced in 0.4.9, we are finally able to use this in 34 stable. We use feature detection (build script) to enable this at build 35 time. 36 37- 0.4.10 38 39 - Use ``repr(C)`` in the ``union`` version that was introduced in 0.4.9, to 40 allay some soundness concerns. 41 42- 0.4.9 43 44 - Use ``union`` in the implementation on when this is detected to be supported 45 (nightly only for now). This is a better solution for treating uninitialized 46 regions correctly, and we'll use it in stable Rust as soon as we are able. 47 When this is enabled, the ``ArrayVec`` has no space overhead in its memory 48 layout, although the size of the vec should not be relied upon. (See `#114`_) 49 - ``ArrayString`` updated to not use uninitialized memory, it instead zeros its 50 backing array. This will be refined in the next version, since we 51 need to make changes to the user visible API. 52 - The ``use_union`` feature now does nothing (like its documentation foretold). 53 54.. _`#114`: https://github.com/bluss/arrayvec/pull/114 55 56- 0.4.8 57 58 - Implement Clone and Debug for ``IntoIter`` by @clarcharr 59 - Add more array sizes under crate features. These cover all in the range 60 up to 128 and 129 to 255 respectively (we have a few of those by default): 61 62 - ``array-size-33-128`` 63 - ``array-size-129-255`` 64 65- 0.4.7 66 67 - Fix future compat warning about raw pointer casts 68 - Use ``drop_in_place`` when dropping the arrayvec by-value iterator 69 - Decrease mininum Rust version (see docs) by @jeehoonkang 70 71- 0.3.25 72 73 - Fix future compat warning about raw pointer casts 74 75- 0.4.6 76 77 - Fix compilation on 16-bit targets. This means, the 65536 array size is not 78 included on these targets. 79 80- 0.3.24 81 82 - Fix compilation on 16-bit targets. This means, the 65536 array size is not 83 included on these targets. 84 - Fix license files so that they are both included (was fixed in 0.4 before) 85 86- 0.4.5 87 88 - Add methods to ``ArrayString`` by @DenialAdams: 89 90 - ``.pop() -> Option<char>`` 91 - ``.truncate(new_len)`` 92 - ``.remove(index) -> char`` 93 94 - Remove dependency on crate odds 95 - Document debug assertions in unsafe methods better 96 97- 0.4.4 98 99 - Add method ``ArrayVec::truncate()`` by @niklasf 100 101- 0.4.3 102 103 - Improve performance for ``ArrayVec::extend`` with a lower level 104 implementation (#74) 105 - Small cleanup in dependencies (use no std for crates where we don't need more) 106 107- 0.4.2 108 109 - Add constructor method ``new`` to ``CapacityError``. 110 111- 0.4.1 112 113 - Add ``Default`` impl to ``ArrayString`` by @tbu- 114 115- 0.4.0 116 117 - Reformed signatures and error handling by @bluss and @tbu-: 118 119 - ``ArrayVec``'s ``push, insert, remove, swap_remove`` now match ``Vec``'s 120 corresponding signature and panic on capacity errors where applicable. 121 - Add fallible methods ``try_push, insert`` and checked methods 122 ``pop_at, swap_pop``. 123 - Similar changes to ``ArrayString``'s push methods. 124 125 - Use a local version of the ``RangeArgument`` trait 126 - Add array sizes 50, 150, 200 by @daboross 127 - Support serde 1.0 by @daboross 128 - New method ``.push_unchecked()`` by @niklasf 129 - ``ArrayString`` implements ``PartialOrd, Ord`` by @tbu- 130 - Require Rust 1.14 131 - crate feature ``use_generic_array`` was dropped. 132 133- 0.3.23 134 135 - Implement ``PartialOrd, Ord`` as well as ``PartialOrd<str>`` for 136 ``ArrayString``. 137 138- 0.3.22 139 140 - Implement ``Array`` for the 65536 size 141 142- 0.3.21 143 144 - Use ``encode_utf8`` from crate odds 145 - Add constructor ``ArrayString::from_byte_string`` 146 147- 0.3.20 148 149 - Simplify and speed up ``ArrayString``’s ``.push(char)``- 150 151- 0.3.19 152 153 - Add new crate feature ``use_generic_array`` which allows using their 154 ``GenericArray`` just like a regular fixed size array for the storage 155 of an ``ArrayVec``. 156 157- 0.3.18 158 159 - Fix bounds check in ``ArrayVec::insert``! 160 It would be buggy if ``self.len() < index < self.capacity()``. Take note of 161 the push out behavior specified in the docs. 162 163- 0.3.17 164 165 - Added crate feature ``use_union`` which forwards to the nodrop crate feature 166 - Added methods ``.is_full()`` to ``ArrayVec`` and ``ArrayString``. 167 168- 0.3.16 169 170 - Added method ``.retain()`` to ``ArrayVec``. 171 - Added methods ``.as_slice(), .as_mut_slice()`` to ``ArrayVec`` and ``.as_str()`` 172 to ``ArrayString``. 173 174- 0.3.15 175 176 - Add feature std, which you can opt out of to use ``no_std`` (requires Rust 1.6 177 to opt out). 178 - Implement ``Clone::clone_from`` for ArrayVec and ArrayString 179 180- 0.3.14 181 182 - Add ``ArrayString::from(&str)`` 183 184- 0.3.13 185 186 - Added ``DerefMut`` impl for ``ArrayString``. 187 - Added method ``.simplify()`` to drop the element for ``CapacityError``. 188 - Added method ``.dispose()`` to ``ArrayVec`` 189 190- 0.3.12 191 192 - Added ArrayString, a fixed capacity analogy of String 193 194- 0.3.11 195 196 - Added trait impls Default, PartialOrd, Ord, Write for ArrayVec 197 198- 0.3.10 199 200 - Go back to using external NoDrop, fixing a panic safety bug (issue #3) 201 202- 0.3.8 203 204 - Inline the non-dropping logic to remove one drop flag in the 205 ArrayVec representation. 206 207- 0.3.7 208 209 - Added method .into_inner() 210 - Added unsafe method .set_len() 211 212 213License 214======= 215 216Dual-licensed to be compatible with the Rust project. 217 218Licensed under the Apache License, Version 2.0 219http://www.apache.org/licenses/LICENSE-2.0 or the MIT license 220http://opensource.org/licenses/MIT, at your 221option. This file may not be copied, modified, or distributed 222except according to those terms. 223 224 225