commit | 930746e7fe4cc8bfb772d2d90c7c3a9442febad7 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Mon Nov 29 14:05:39 2021 -0800 |
committer | Joel Galenson <jgalenson@google.com> | Fri Dec 10 15:33:37 2021 -0800 |
tree | 56a6967701ac6101a0d79dd61724d3a4587ceb7a | |
parent | 7080eb50e93caac826d15fa858f3394a5e1dfd40 [diff] |
Refresh Android.bp, cargo2android.json, TEST_MAPPING. Test: None Change-Id: Id87f4b1ca31672e14a5f0c66f6c91ed5ae4ed441
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