Bug: 159603647

Clone this repo:
  1. 3b9e18d Make libsmallvec available to resolv module am: 8ae8fd4570 am: fda98b38d8 by Mike Yu · 6 months ago build-tools-release main master
  2. fda98b3 Make libsmallvec available to resolv module am: 8ae8fd4570 by Mike Yu · 6 months ago
  3. 8ae8fd4 Make libsmallvec available to resolv module by Mike Yu · 6 months ago
  4. cf55601 Make smallvec available to product and vendor am: 48d46cce35 am: 1d11037c6f by Matthew Maurer · 7 months ago
  5. 1d11037 Make smallvec available to product and vendor am: 48d46cce35 by Matthew Maurer · 7 months ago android-u-beta-1-gpl

rust-smallvec

Documentation

Release notes

“Small vector” optimization for Rust: store up to a small number of items on the stack

Example

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();