tag | 6d3e52091f87a660c5bd4ea2053537c06262c602 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue May 14 16:45:17 2024 -0700 |
object | 34814782733122fa44ba90ca7a8e32ac1c410345 |
Android 14.0.0 release 44
commit | 34814782733122fa44ba90ca7a8e32ac1c410345 | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Thu Mar 09 18:07:00 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Mar 09 18:07:00 2023 +0000 |
tree | b20f2866c1a76f13beb74f38d89e4f93290a0da8 | |
parent | e130e61915094e3d5ea9eddf9389a5a74ceaf94c [diff] | |
parent | a18dbf841b9e47ee299fae975d6cc08204c5c054 [diff] |
Make tinyvec available to product and vendor am: 9dfef5cba3 am: e8eb68870a am: ac443c695f am: a18dbf841b Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2476528 Change-Id: If396c40605b4df5e056aa589da37950a5bed226b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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