commit | f96c264899a8aec95058026b9b6d3f5b29d3e4c5 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 06 17:41:43 2021 -0700 |
committer | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 06 17:41:43 2021 -0700 |
tree | 734da986b3c6a1a7f8d5a31d7e26febcd3087f0c | |
parent | 056bfea19ca5015c83addb028a6211655dface03 [diff] | |
parent | 96e1b5cacf48334fb48d4f7933edc38748015b27 [diff] |
Merge 96e1b5cacf48334fb48d4f7933edc38748015b27 on remote branch Change-Id: Ie8f7c780daca7ebef3cc8327f7ec1ab9f2216c5c
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