tag | 22573813bcd174758fa249234cc59a369f4cbdfc | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Aug 31 06:38:25 2022 -0700 |
object | c713091a3ad90c2c6ad2d65095ab8f372048a78e |
t_frc_ext_330443000
commit | c713091a3ad90c2c6ad2d65095ab8f372048a78e | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon May 09 06:02:22 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon May 09 06:02:22 2022 +0000 |
tree | da86de748981dd96113865df11834b360d9da02b | |
parent | 1e81eaaa046b4bfc0752141e313fc0196f261fd6 [diff] | |
parent | 638d0ee87b2ef1082fe674e75f89932b179fe32a [diff] |
Snap for 8558685 from 638d0ee87b2ef1082fe674e75f89932b179fe32a to tm-frc-extservices-release Change-Id: I7f7c1800dd04e06ed03d8be6a9dcd65fcf2535be
“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();