commit | d0c1b611f3cf58ea4f6e1fde5c9789ece0bc2275 | [log] [tgz] |
---|---|---|
author | Bill Rassieur <rassb@google.com> | Thu May 27 20:04:47 2021 +0000 |
committer | Bill Rassieur <rassb@google.com> | Thu May 27 20:04:47 2021 +0000 |
tree | 31e9c0110157611337ac93b3fd8f7106a2725f77 | |
parent | ed803162817069116d8f8ace0a718fb3b43a1980 [diff] | |
parent | 7ea82c332b53cf96e691b3c6f5b9ee4ddd75b1ad [diff] |
Merge sc-mainline-prod to master. Change-Id: I94f570a3510f4204a7eb9efd672a41ae37f2a6e8
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