| commit | d7b17735ab2792b45e433e79a9850c66e7c258fa | [log] [tgz] |
|---|---|---|
| author | android-build-team Robot <[email protected]> | Thu May 13 21:12:35 2021 +0000 |
| committer | android-build-team Robot <[email protected]> | Thu May 13 21:12:35 2021 +0000 |
| tree | 374e6263abc26a82e70c06ffcb32122ace1036af | |
| parent | 317c9860d46d33b2d2abd90712d332eda41a8ddb [diff] | |
| parent | 4a33a6760350692e218c052f4f70502a61af370d [diff] |
Snap for 7358968 from 4a33a6760350692e218c052f4f70502a61af370d to sc-d2-release Change-Id: I8b1dc6d9591f340ed6f0e8b6ccb0ea484f4a08c8
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