tag | efe24cd017ca08e3107fc6f807064816adfde069 | |
---|---|---|
tagger | The Android Open Source Project <[email protected]> | Mon Sep 23 16:15:58 2024 -0700 |
object | cc7e6c15b214dd0dd7036b1aaf50bfbf8f1e591a |
frc_350820660 (12261220,com.google.android.go.networkstack,com.google.android.networkstack)
commit | cc7e6c15b214dd0dd7036b1aaf50bfbf8f1e591a | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri May 24 02:21:32 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri May 24 02:21:32 2024 +0000 |
tree | 7872e8d542897450d9a437be1d1a3c7308e08b19 | |
parent | 2a46c28016e1731abb11fa0aebdced2d3fe27b98 [diff] | |
parent | f14c9fb2a012e9627636b447f52d88ae572f074c [diff] |
Snap for 11883240 from f14c9fb2a012e9627636b447f52d88ae572f074c to aml-frc-release Change-Id: I313bf672915ad9c398797d00987bd90c431dd508
“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();