| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| .github/workflows/ | 03-May-2024 | - | 102 | 81 | ||
| benches/ | 03-May-2024 | - | 315 | 270 | ||
| debug_metadata/ | 03-May-2024 | - | 147 | 114 | ||
| scripts/ | 03-May-2024 | - | 25 | 12 | ||
| src/ | 03-May-2024 | - | 3,159 | 2,218 | ||
| tests/ | 03-May-2024 | - | 94 | 71 | ||
| .cargo_vcs_info.json | D | 03-May-2024 | 94 | 6 | 6 | |
| .gitignore | D | 03-May-2024 | 38 | 4 | 3 | |
| Android.bp | D | 03-May-2024 | 1.9 KiB | 58 | 54 | |
| Cargo.toml | D | 03-May-2024 | 1.6 KiB | 70 | 60 | |
| Cargo.toml.orig | D | 03-May-2024 | 1.4 KiB | 49 | 42 | |
| LICENSE | D | 03-May-2024 | 10.6 KiB | 202 | 169 | |
| LICENSE-APACHE | D | 03-May-2024 | 10.6 KiB | 202 | 169 | |
| LICENSE-MIT | D | 03-May-2024 | 1 KiB | 26 | 22 | |
| METADATA | D | 03-May-2024 | 661 | 24 | 22 | |
| MODULE_LICENSE_APACHE2 | D | 03-May-2024 | 0 | |||
| OWNERS | D | 03-May-2024 | 40 | 2 | 1 | |
| README.md | D | 03-May-2024 | 649 | 27 | 18 | |
| TEST_MAPPING | D | 03-May-2024 | 625 | 30 | 29 | |
| cargo2android.json | D | 03-May-2024 | 226 | 13 | 12 |
README.md
1rust-smallvec 2============= 3 4[Documentation](https://docs.rs/smallvec/) 5 6[Release notes](https://github.com/servo/rust-smallvec/releases) 7 8"Small vector" optimization for Rust: store up to a small number of items on the stack 9 10## Example 11 12```rust 13use smallvec::{SmallVec, smallvec}; 14 15// This SmallVec can hold up to 4 items on the stack: 16let mut v: SmallVec<[i32; 4]> = smallvec![1, 2, 3, 4]; 17 18// It will automatically move its contents to the heap if 19// contains more than four items: 20v.push(5); 21 22// SmallVec points to a slice, so you can use normal slice 23// indexing and other methods to access its contents: 24v[0] = v[1] + v[2]; 25v.sort(); 26``` 27