| commit | cfb2ce0caffc593ebe6246a378cbe00097445599 | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Wed Dec 20 00:15:55 2023 +0000 |
| committer | Android Build Coastguard Worker <[email protected]> | Wed Dec 20 00:15:55 2023 +0000 |
| tree | 18af4f5ec90bd2bf1c1df2dd3d030f539b1a6d21 | |
| parent | e6514636e83fabf33b155507186c9f2fcca2cc10 [diff] | |
| parent | bc2339de868009a57404a6c66c97516bd356019a [diff] |
Snap for 11237698 from bc2339de868009a57404a6c66c97516bd356019a to 24D1-release Change-Id: Ifcee2710960b8b79235f958738eb80c1b95d0364
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