commit | 3cb205691c6c54f22cb374d3bd82fe742d0abf34 | [log] [tgz] |
---|---|---|
author | Matthew Maurer <[email protected]> | Tue May 31 19:06:15 2022 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue May 31 19:06:15 2022 +0000 |
tree | f9ecff9ff1bf403978b80e122b9fac0d2d2a3369 | |
parent | fb5fbfdb1c739f29b4aa325884ab6e6e45a116b7 [diff] | |
parent | 588759325423a0a554d7fa55bf681d68c88860ea [diff] |
Update TEST_MAPPING am: 3f37e30c46 am: cf57fca32c am: cd4da38748 am: 907f295e8e am: 5887593254 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/2108612 Change-Id: I66fe1c93d0c5c565e5dec576347ebc408e600a55 Signed-off-by: Automerger Merge Worker <[email protected]>
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