commit | e4eb1c589d2773232dccfb0cf6a7b99f97c297e5 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Dec 21 09:48:59 2020 +0100 |
committer | Jeff Vander Stoep <jeffv@google.com> | Mon Dec 21 09:48:59 2020 +0100 |
tree | e6bfa0563d12cfe6862d7db73fcb031cc06cb26d | |
parent | c7447f8575bedeb4b65d8c279064f21b36053140 [diff] |
Add Android.bp Test: mm Test: atest Change-Id: I488658eb82aeae7369864b6fcf9bdc710ce3ad2f
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