commit | 497e98b0a08cdbb8b050713c1c1df2f34417a39b | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Tue Jan 31 18:53:29 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jan 31 18:53:29 2023 +0000 |
tree | b5c8c51cb9dd1f2aaec7ac25763e728f3c379da5 | |
parent | 348b914db6ce67e0a3994ab388aca772207083e1 [diff] | |
parent | b9d5e9fc1a75f36abfe49ee81fcc1c0e72b47ecd [diff] |
Update TEST_MAPPING am: b9d5e9fc1a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/smallvec/+/2411752 Change-Id: Ic8c9eb4e1d989b7dcd1dcdb1ee4a7c37ef0811af Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
“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();