tag | c103de5a60d617cb7cf0643035902b7dd29377d6 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Aug 22 14:00:15 2022 -0700 |
object | 0b201c8edc441b7744c7a1e44876f8c5479d4d3a |
Platform Tools Release 33.0.2 (8557947)
commit | 0b201c8edc441b7744c7a1e44876f8c5479d4d3a | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun May 08 04:34:36 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun May 08 04:34:36 2022 +0000 |
tree | da86de748981dd96113865df11834b360d9da02b | |
parent | d5ccdc5c58fa91bd15dbed3dfaa954246d749c90 [diff] | |
parent | 426246d39500cfa4e261f4de5981de545ee12f60 [diff] |
Snap for 8554636 from 426246d39500cfa4e261f4de5981de545ee12f60 to sdk-release Change-Id: Ieac1425cb372a8f1487af3bdf2514f8801da7f96
“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();