tag | c7f4bc80d95231b9ac18f56d5c9ed41b6d344d8a | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu Apr 15 10:59:47 2021 -0700 |
object | d013d8e30f74aa00bb0251b4f031f28a60f2ded6 |
Platform Tools Release 31.0.1 (7187441)
commit | d013d8e30f74aa00bb0251b4f031f28a60f2ded6 | [log] [tgz] |
---|---|---|
author | android-build-prod (mdb) <android-build-team-robot@google.com> | Thu Mar 04 00:39:48 2021 +0000 |
committer | android-build-prod (mdb) <android-build-team-robot@google.com> | Thu Mar 04 00:39:48 2021 +0000 |
tree | 734da986b3c6a1a7f8d5a31d7e26febcd3087f0c | |
parent | ea2ddcbf4341a0caa4cbf16a0765fa5e05a944dd [diff] | |
parent | e9ea57ca26667663735443be8d1152d29a0eecb3 [diff] |
Snap for 7183507 from e9ea57ca26667663735443be8d1152d29a0eecb3 to sdk-release Change-Id: I631dc94c6aaeb756515a19a74fa2c66e42531b0d
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