| commit | 7d39693a59654188c1bf3165ae586e95047eff00 | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Wed Dec 20 00:17:56 2023 +0000 |
| committer | Android Build Coastguard Worker <[email protected]> | Wed Dec 20 00:17:56 2023 +0000 |
| tree | 18af4f5ec90bd2bf1c1df2dd3d030f539b1a6d21 | |
| parent | 79cc0242160bab5af245480608922fc2a04775d7 [diff] | |
| parent | bc2339de868009a57404a6c66c97516bd356019a [diff] |
Snap for 11237490 from bc2339de868009a57404a6c66c97516bd356019a to 24Q2-release Change-Id: I8a6c4afd98c5f9a47b5a03b20509893c55b09384
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