commit | 427088626a5909d6be10b68d24fec8ea8bd21c70 | [log] [tgz] |
---|---|---|
author | Haibo Huang <hhb@google.com> | Wed Feb 10 07:20:28 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Feb 10 07:20:28 2021 +0000 |
tree | 8aeebd7a62744e274aee61db3a48f240947b1b49 | |
parent | 86a4744d7fc6c894fafe28fc32d664aa0f6699d7 [diff] | |
parent | 642665c0726c23aae71894ca1c778bae9b07238c [diff] |
Upgrade rust/crates/tinyvec to 1.1.1 am: 64e0888754 am: 2fca6e7303 am: f9d9c987ce am: 642665c072 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/1582222 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie6b6e9a9db086b5f3f7ed6683a18441700c6eef0
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