commit | 26e034191cef7d4978612c1600289ffb844d0ea1 | [log] [tgz] |
---|---|---|
author | Julien Desprez <[email protected]> | Tue Feb 16 19:35:56 2021 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Feb 16 19:35:56 2021 +0000 |
tree | 84b51f59d067af4c9085d1c4906cd52339aa29ee | |
parent | 275037b1afad18091b902e248c48c30c6104d7ad [diff] | |
parent | 377ba206c2242357c54815ec599fbf15ce86cbc7 [diff] |
Clean up rust_test_host TEST_MAPPING after default update am: cadc338164 am: 377ba206c2 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/smallvec/+/1590018 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: If0375fe66d084ae81c254cca2459339b326b7e3f
“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();