commit | d9e275c2385381a28dfb21345239887501f29e19 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 05 09:57:47 2022 -0700 |
committer | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 05 09:57:47 2022 -0700 |
tree | e8c805f584b07b27ac90473666626006bbd63932 | |
parent | 2574eb0b4a7eacdea1793148dcc9e2b449b7d124 [diff] | |
parent | 14f500fe078ee7854d151cf39d62ed9afa95d9ac [diff] |
Merge 14f500fe078ee7854d151cf39d62ed9afa95d9ac on remote branch Change-Id: Ibab955d7174e9f1b0350ba8a85ccc2efa9f6a3b7
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