tag | aafaa8043b0980f0aaab7797e9c8ac37d9d61880 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Nov 07 09:27:24 2022 -0800 |
object | c3e5b09826dcf15acbe05a8b7941bc6aa0494026 |
Android platform 13.0.0 release 2
commit | c3e5b09826dcf15acbe05a8b7941bc6aa0494026 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 17 01:06:02 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 17 01:06:02 2022 +0000 |
tree | da86de748981dd96113865df11834b360d9da02b | |
parent | 76fb73fd7205cf96cf8be7c6e1b8a8906be03390 [diff] | |
parent | 638d0ee87b2ef1082fe674e75f89932b179fe32a [diff] |
Snap for 8310722 from 638d0ee87b2ef1082fe674e75f89932b179fe32a to tm-release Change-Id: I97ea00d02351f69c235fc60d961de729f779611d
“Small vector” optimization for Rust: store up to a small number of items on the stack
use smallvec::{SmallVec, smallvec}; // This SmallVec can hold up to 4 items on the stack: let mut v: SmallVec<[i32; 4]> = smallvec![1, 2, 3, 4]; // It will automatically move its contents to the heap if // contains more than four items: v.push(5); // SmallVec points to a slice, so you can use normal slice // indexing and other methods to access its contents: v[0] = v[1] + v[2]; v.sort();