commit | a3caf73a043523cea104b1fd671c2f75ec2541a9 | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Tue Feb 16 22:08:38 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Feb 16 22:08:38 2021 +0000 |
tree | 734da986b3c6a1a7f8d5a31d7e26febcd3087f0c | |
parent | 642665c0726c23aae71894ca1c778bae9b07238c [diff] | |
parent | d35db79dcc39cec05c89bfe83a7cb1ab84c8ff47 [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/tinyvec am: 9bec1df910 am: e9ea57ca26 am: d35db79dcc Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/1588757 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I0bb281679055fe707e7592b658884b70c6c35643
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