commit | 258213f13608ac25493accd3174d424ffa3f679f | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <[email protected]> | Mon Dec 19 17:11:09 2022 +0000 |
committer | Automerger Merge Worker <[email protected]> | Mon Dec 19 17:11:09 2022 +0000 |
tree | 856cf5e90aafdd7731447d325bc2aa2339f37451 | |
parent | 7bbc70bda7fce578aa2c20fddfb07f8f87bc9d54 [diff] | |
parent | 1cef3f599ca84f2a2fcae1654c594ee7fa9bfb30 [diff] |
Upgrade tinyvec to 1.6.0 am: ceb662cbb2 am: 31d99591ee am: 1cef3f599c Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2362484 Change-Id: I635b1e393b9e54846c2d6e92d839e2f26e422a9c Signed-off-by: Automerger Merge Worker <[email protected]>
A 100% safe crate of vec-like types. #![forbid(unsafe_code)]
Main types are as follows:
ArrayVec
is an array-backed vec-like data structure. It panics on overflow.SliceVec
is the same deal, but using a &mut [T]
.TinyVec
(alloc
feature) is an enum that's either an Inline(ArrayVec)
or a Heap(Vec)
. If a TinyVec
is Inline
and would overflow it automatically transitions to Heap
and continues whatever it was doing.To attain this “100% safe code” status there is one compromise: the element type of the vecs must implement Default
.
For more details, please see the docs.rs documentation