commit | 90306cd26ccde5018e41fdd2dfd8663acff98111 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <[email protected]> | Wed Jun 15 18:53:58 2022 +0000 |
committer | Gerrit Code Review <[email protected]> | Wed Jun 15 18:53:58 2022 +0000 |
tree | e3c3e822585ae016995730950b05fc47a5c680f2 | |
parent | 871eb4c7c3580fb6469e04c4a622be50f7fcc910 [diff] | |
parent | a0f8acf004a41fa3c68b1f4b32ee7201bd70fb06 [diff] |
Merge "Update TEST_MAPPING"
“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();