commit | ff3a8baf9bb8879f4530c73af5a54fd2d088ff23 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Wed Jun 09 03:00:53 2021 -0700 |
committer | Linux Build Service Account <lnxbuild@localhost> | Wed Jun 09 03:00:53 2021 -0700 |
tree | 374e6263abc26a82e70c06ffcb32122ace1036af | |
parent | f96c264899a8aec95058026b9b6d3f5b29d3e4c5 [diff] | |
parent | a8e468c5d522c2f1ebf14bbd3793d4506c79ec0d [diff] |
Merge a8e468c5d522c2f1ebf14bbd3793d4506c79ec0d on remote branch Change-Id: I56f91200b3f026d4bf8d1be587148619fd5d9999
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