| commit | e85238c6b024350f67ebe57a505bdad3abb3f9f7 | [log] [tgz] |
|---|---|---|
| author | android-build-team Robot <[email protected]> | Fri Apr 30 01:06:18 2021 +0000 |
| committer | android-build-team Robot <[email protected]> | Fri Apr 30 01:06:18 2021 +0000 |
| tree | db4d0e44724680777d1deb24b31b959c2caaee24 | |
| parent | 019c218d31422a586badabe0854d0bd613e49a4f [diff] | |
| parent | a80d623ee5d955740b6adbe2d971d1f724c29846 [diff] |
Snap for 7325096 from a80d623ee5d955740b6adbe2d971d1f724c29846 to sc-d1-release Change-Id: Icdfd8013e4d4704c9392ab7093646e51f616ba03
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