tag | bcb1aacbab5b510b3eb4c834c7a7ee89c5158d9a | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed May 08 00:18:07 2024 -0700 |
object | c30791a55e277f30ae20d6a6db19a72e096cab3c |
Android CTS 14.0 Release 4 (11801623)
commit | c30791a55e277f30ae20d6a6db19a72e096cab3c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Apr 19 01:23:50 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Apr 19 01:23:50 2023 +0000 |
tree | 40c1ec7f8824c6f65686d9ffb768102f82961542 | |
parent | c441b89c249e8c54dc424f792cf78f45ea9aecd6 [diff] | |
parent | 28ee3e669df78bf94e18d0a22456d6f49dae8669 [diff] |
Snap for 9966400 from 28ee3e669df78bf94e18d0a22456d6f49dae8669 to udc-release Change-Id: I17b80611e7780f96b3040990230d577620722053
“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();