commit | 512ef6e0bc64fd28b5f6d4df3f4779773291ac70 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Sun May 16 01:06:18 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Sun May 16 01:06:18 2021 +0000 |
tree | 374e6263abc26a82e70c06ffcb32122ace1036af | |
parent | 0e85d4de73f0b9a68cabf691a13bb6fb521f137e [diff] | |
parent | 78fc5f3fd63d205be06b8bc2e7aa2f54b4a8b5a3 [diff] |
Snap for 7366010 from 78fc5f3fd63d205be06b8bc2e7aa2f54b4a8b5a3 to tm-release Change-Id: I88780491827ac03b4d62de20ec37ae701e8d8322
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