| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| .github/workflows/ | 06-Sep-2024 | - | 113 | 92 | ||
| benches/ | 06-Sep-2024 | - | 313 | 268 | ||
| debug_metadata/ | 06-Sep-2024 | - | 147 | 115 | ||
| scripts/ | 06-Sep-2024 | - | 25 | 12 | ||
| src/ | 06-Sep-2024 | - | 3,538 | 2,440 | ||
| tests/ | 06-Sep-2024 | - | 94 | 71 | ||
| .cargo_vcs_info.json | D | 06-Sep-2024 | 94 | 6 | 6 | |
| .gitignore | D | 06-Sep-2024 | 47 | 5 | 4 | |
| Android.bp | D | 06-Sep-2024 | 2 KiB | 61 | 57 | |
| Cargo.toml | D | 06-Sep-2024 | 1.6 KiB | 73 | 63 | |
| Cargo.toml.orig | D | 06-Sep-2024 | 1.4 KiB | 51 | 44 | |
| LICENSE | D | 06-Sep-2024 | 10.6 KiB | 202 | 169 | |
| LICENSE-APACHE | D | 06-Sep-2024 | 10.6 KiB | 202 | 169 | |
| LICENSE-MIT | D | 06-Sep-2024 | 1 KiB | 26 | 22 | |
| METADATA | D | 06-Sep-2024 | 649 | 21 | 19 | |
| MODULE_LICENSE_APACHE2 | D | 06-Sep-2024 | 0 | |||
| OWNERS | D | 06-Sep-2024 | 40 | 2 | 1 | |
| README.md | D | 06-Sep-2024 | 649 | 27 | 18 | |
| TEST_MAPPING | D | 06-Sep-2024 | 625 | 30 | 29 | |
| cargo_embargo.json | D | 06-Sep-2024 | 224 | 14 | 13 |
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