tag | 3530189718312c38d19f6773c3c9156debc7e513 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Apr 24 20:09:15 2024 -0700 |
object | a4541144cbf9c48072b40b1a121cf9b93fe5dbca |
aml_ips_341611000 (11398421,com.google.android.ipsec)
commit | a4541144cbf9c48072b40b1a121cf9b93fe5dbca | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 04:55:45 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 04:55:45 2023 +0000 |
tree | 40c1ec7f8824c6f65686d9ffb768102f82961542 | |
parent | d457ebe150fd52a1b1d4225c85e4cd08d272b2af [diff] | |
parent | 495bd26a973c32834671073f381f373d2c5b407b [diff] |
Snap for 10453563 from 495bd26a973c32834671073f381f373d2c5b407b to mainline-ipsec-release Change-Id: Ie85f3483b076545440fe4720658cbee36dd892b0
“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();