commit | eab37b8fd2841f7f95c7fc364f7ebda447c471fc | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:56:07 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:56:07 2022 +0000 |
tree | e8c805f584b07b27ac90473666626006bbd63932 | |
parent | e1dc751c0946ca3b16aacd5f007b646bff1bc6ee [diff] | |
parent | 483f46228ded54aec62d5eb2eba69415a24c9c7d [diff] |
Snap for 8992082 from 483f46228ded54aec62d5eb2eba69415a24c9c7d to gki13-boot-release Change-Id: Ic4fc724248db8357bb979f569ccb098c3ac7cf2e
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