commit | 64d6692d06af662c1239d94af69c16c42990e6ea | [log] [tgz] |
---|---|---|
author | Joel Galenson <[email protected]> | Wed Dec 15 16:02:11 2021 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Dec 15 16:02:11 2021 +0000 |
tree | 56a6967701ac6101a0d79dd61724d3a4587ceb7a | |
parent | 24c95aca462699305dbea62444d4420454408d40 [diff] | |
parent | 3a423cbd39df8d0e08dad837f1ee3b5964066033 [diff] |
Merge "Refresh Android.bp, cargo2android.json, TEST_MAPPING." am: 3a423cbd39 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/1912690 Change-Id: I30d9005f26efa1b6d06d6469a7d6b1b5334ff460
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