tag | 6c5a3072519048f50fc876aa62489e7dd8eafb72 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri May 26 06:12:01 2023 -0700 |
object | f9b3168a7aaa87e1bca97afbd634c8c8e5d18c9e |
aml_ads_331710270
commit | f9b3168a7aaa87e1bca97afbd634c8c8e5d18c9e | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Mar 16 22:42:21 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Mar 16 22:42:21 2022 +0000 |
tree | da86de748981dd96113865df11834b360d9da02b | |
parent | bcbb2293e68b7ea9e451b4af2b3c5474708b6f59 [diff] | |
parent | dd67dd31f83d56d34f933f3ff0204baa55a68aac [diff] |
Snap for 8310876 from dd67dd31f83d56d34f933f3ff0204baa55a68aac to mainline-adservices-release Change-Id: Ieb3c3efe34157c110c2375dda887e4f3e881100a
“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();