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