commit | 1cef3f599ca84f2a2fcae1654c594ee7fa9bfb30 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Dec 19 15:41:32 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Dec 19 15:41:32 2022 +0000 |
tree | 856cf5e90aafdd7731447d325bc2aa2339f37451 | |
parent | fe2507000dadd52b96daec114ebb7c5c1b432dc0 [diff] | |
parent | 31d99591ee3ddb7d611783586d71969bf86ab11d [diff] |
Upgrade tinyvec to 1.6.0 am: ceb662cbb2 am: 31d99591ee Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2362484 Change-Id: I791c8d0c3d15874d2e7ab819d02f16e108e0b7b3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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