| commit | 8aa1bb8ca3f1f43de41a0dccc4a680ae60b01246 | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Mon Mar 14 07:04:58 2022 +0000 |
| committer | Android Build Coastguard Worker <[email protected]> | Mon Mar 14 07:04:58 2022 +0000 |
| tree | e8c805f584b07b27ac90473666626006bbd63932 | |
| parent | 04caebbd7b765aab0d01bc22672ff332237a4231 [diff] | |
| parent | 45a4163756baae2fb0dc5dd94aa486fdf29b9a5e [diff] |
Snap for 8294919 from 45a4163756baae2fb0dc5dd94aa486fdf29b9a5e to main-cg-testing-release Change-Id: I8fb0e8e6dab5ce2231a70d9e7aa71cfc8e3d2ca4
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