commit | b9039b2006949d8bcab3c4358c3053a43ca92048 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon Dec 20 11:05:28 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon Dec 20 11:05:28 2021 +0000 |
tree | 374e6263abc26a82e70c06ffcb32122ace1036af | |
parent | a8e468c5d522c2f1ebf14bbd3793d4506c79ec0d [diff] | |
parent | 9018e201b1a2fdf8ff5c1b94522b8cc7160d2b2e [diff] |
Snap for 8014993 from 9018e201b1a2fdf8ff5c1b94522b8cc7160d2b2e to s-keystone-qcom-release Change-Id: I8d4116491ec65c67dd25c21f486963ddc5b369ce
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