commit | b1cb14d47fd11679f62236c1177c8a3d3cda69e2 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Wed Jan 26 00:37:01 2022 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Wed Jan 26 00:37:01 2022 -0800 |
tree | 6451c178fd78b37754d01bf4ee0c1ee8f02e3fd9 | |
parent | b3e8733400e3024f8b61c8c2ce2b5418586a31fe [diff] | |
parent | ac22a59234a137e9e3c754e48e7317b94d72b8bb [diff] |
Merge ac22a59234a137e9e3c754e48e7317b94d72b8bb on remote branch Change-Id: I3d484de0869a00199f27c17d2abbb7839c10d099
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