commit | 78fc5f3fd63d205be06b8bc2e7aa2f54b4a8b5a3 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Sat May 15 05:39:39 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Sat May 15 05:39:39 2021 +0000 |
tree | 374e6263abc26a82e70c06ffcb32122ace1036af | |
parent | 684273f245374ab5a617755f9631557e9928ad32 [diff] | |
parent | 317c9860d46d33b2d2abd90712d332eda41a8ddb [diff] |
Delete unused patch am: 8cd413ec55 am: 8b61db0745 am: b5d6d1540b am: a80d623ee5 am: 317c9860d4 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/1689362 Change-Id: I0086ffaedab9f45b42f3cd316b50fa012109a851
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