commit | 483f46228ded54aec62d5eb2eba69415a24c9c7d | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Jun 15 21:00:52 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jun 15 21:00:52 2022 +0000 |
tree | e8c805f584b07b27ac90473666626006bbd63932 | |
parent | cd4da3874809c5d822e079bbf19c1a8eea7fbb95 [diff] | |
parent | d0f967d67d55406b542d8a81a8396a516acd9f08 [diff] |
Merge "Update TEST_MAPPING" am: 3cb1afacd1 am: d0f967d67d Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2125583 Change-Id: I707a862752b7139ef4d09fd9d417f8f5af08fe5b 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