commit | 2574eb0b4a7eacdea1793148dcc9e2b449b7d124 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Wed Feb 16 21:43:28 2022 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Wed Feb 16 21:43:28 2022 -0800 |
tree | 56a6967701ac6101a0d79dd61724d3a4587ceb7a | |
parent | b1cb14d47fd11679f62236c1177c8a3d3cda69e2 [diff] | |
parent | a40509c0040bd1de0aea4792667aa92597b77460 [diff] |
Merge a40509c0040bd1de0aea4792667aa92597b77460 on remote branch Change-Id: Ie7a9f8e1a9052783ace206b3e0b88d64e817a3bc
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