commit | 31d99591ee3ddb7d611783586d71969bf86ab11d | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Dec 19 13:46:24 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Dec 19 13:46:24 2022 +0000 |
tree | 856cf5e90aafdd7731447d325bc2aa2339f37451 | |
parent | 65747c26473e453a7fba3d21465f68bff13de059 [diff] | |
parent | ceb662cbb2cb6aaf3bbbab8cdbcaa118e3bb8a4f [diff] |
Upgrade tinyvec to 1.6.0 am: ceb662cbb2 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2362484 Change-Id: I52e1cd2e1a115f37e49b66fe3d88f9e618260668 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