commit | b9d5e9fc1a75f36abfe49ee81fcc1c0e72b47ecd | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Jan 30 13:59:10 2023 +0100 |
committer | Jeff Vander Stoep <jeffv@google.com> | Mon Jan 30 13:59:10 2023 +0100 |
tree | b5c8c51cb9dd1f2aaec7ac25763e728f3c379da5 | |
parent | 21ef8b2f6c36ae36a5c8a60b3a3308dd28636aef [diff] |
Update TEST_MAPPING Test: atest Change-Id: I234e402d9358070f78a30a5d8cb1a438dd09351a
“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();