tag | 7b5d8b6b8dc39e46ea9c52cf17c623f5a54a1907 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu May 19 15:59:09 2022 -0700 |
object | 4456dd2f55e2bc7eeb098d564790671f6bcdd7a7 |
Platform Tools Release 32.0.0 (8006631)
commit | 4456dd2f55e2bc7eeb098d564790671f6bcdd7a7 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 00:04:27 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 00:04:27 2021 +0000 |
tree | 7569440475603d4e38e2f550b90803081226481b | |
parent | dc8dc3c6fa0f1bbe63278e7b4d55f38538480e26 [diff] | |
parent | 44b1240f837efb35816b93aa586ff47ba72dacb9 [diff] |
Snap for 8005954 from 44b1240f837efb35816b93aa586ff47ba72dacb9 to sdk-release Change-Id: I3a7235703f17b461c135999a530f6553a8eb8571
“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();