commit | 874ba7dc380c50540af907bcbe65182c9d331707 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Mon Aug 09 10:47:58 2021 -0700 |
committer | Joel Galenson <jgalenson@google.com> | Mon Aug 09 10:47:58 2021 -0700 |
tree | 7c9207d77f9ab146b60fdb9130e559073803c92f | |
parent | 2a7eb705096ad92acfe89fdd2d487f7b4be2a098 [diff] |
Upgrade rust/crates/tinyvec to 1.3.1 Test: make Change-Id: I1a901c023db9f9c52760e89d3cd1b2ab903821d0
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