commit | 1f97ab5903fcfb0091eca80996ccf69ba5735e2a | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Feb 05 10:00:37 2024 +0100 |
committer | Jeff Vander Stoep <jeffv@google.com> | Mon Feb 05 10:00:37 2024 +0100 |
tree | 9d9548529b260bac4bd6063fc336192fadb522d7 | |
parent | 5d9d02fb0ff17b83d0384d5a0e2389a8d4759c7e [diff] |
Upgrade smallvec to 1.13.1 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/rust/crates/smallvec For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I011f1a4b6ea04375b0c2aadeefa4766f5179a37c
“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();