tag | 400fffeb66d87709ade3f60fa5a34ca09dfea9d6 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu Apr 15 10:59:48 2021 -0700 |
object | 37ae21ebab445a96bf803b1ae11628a96e7fff23 |
Platform Tools Release 31.0.1 (7187441)
commit | 37ae21ebab445a96bf803b1ae11628a96e7fff23 | [log] [tgz] |
---|---|---|
author | android-build-prod (mdb) <android-build-team-robot@google.com> | Thu Mar 04 00:39:45 2021 +0000 |
committer | android-build-prod (mdb) <android-build-team-robot@google.com> | Thu Mar 04 00:39:45 2021 +0000 |
tree | 301fc457c178d7a6e8031eb136d7bf951a404406 | |
parent | cb506a611143276430d040401677e834b207793f [diff] | |
parent | 2188055b689f093e1e3a439a935cda2f2f44ab42 [diff] |
Snap for 7183507 from 2188055b689f093e1e3a439a935cda2f2f44ab42 to sdk-release Change-Id: Ifb689e1d9e477350524d8349591843359463cb53
“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();