commit | 056797c370adea5ce41eee207baca8b3860b22b4 | [log] [tgz] |
---|---|---|
author | David LeGare <legare@google.com> | Thu Mar 03 14:19:30 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Mar 03 14:19:30 2022 +0000 |
tree | e8c805f584b07b27ac90473666626006bbd63932 | |
parent | 63072d7e13e328352dd61cfdf9facf3c4bb3ff84 [diff] | |
parent | 45a4163756baae2fb0dc5dd94aa486fdf29b9a5e [diff] |
Update TEST_MAPPING am: 430ec0c1e4 am: 45a4163756 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2006430 Change-Id: I4219bf2d77918beb48bc7432f27b01bdcdcc3104
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