tag | d20dff6916aeed50e8ebd856f63d410e1b911c20 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue May 16 21:53:07 2023 -0700 |
object | 906e8bfe28fd2b0c7ec12093571d528e6a61612f |
Platform Tools Release 34.0.3 (9979309)
commit | 906e8bfe28fd2b0c7ec12093571d528e6a61612f | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 20 16:08:38 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 20 16:08:38 2023 +0000 |
tree | b20f2866c1a76f13beb74f38d89e4f93290a0da8 | |
parent | 54406f30e55af4b60b6812e6fb6910f91a0873cd [diff] | |
parent | e8eb68870abbe4fef7931a5934d4aa4a942859ba [diff] |
Snap for 9979206 from e8eb68870abbe4fef7931a5934d4aa4a942859ba to sdk-release Change-Id: I36f859aef871c404bc61149eeda20af0e638f2e5
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