• Home
Name Date Size #Lines LOC

..--

benches/04-Jul-2025-313268

debug_metadata/04-Jul-2025-147115

scripts/04-Jul-2025-2512

src/04-Jul-2025-3,6172,506

tests/04-Jul-2025-9471

.android-checksum.jsonD04-Jul-20251.7 KiB11

.cargo-checksum.jsonD04-Jul-20251.3 KiB11

Android.bpD04-Jul-2025999 3733

Cargo.tomlD04-Jul-20252 KiB9682

LICENSED04-Jul-202510.6 KiB202169

LICENSE-APACHED04-Jul-202510.6 KiB202169

METADATAD04-Jul-2025422 1817

MODULE_LICENSE_APACHE2D04-Jul-20250

README.mdD04-Jul-2025649 2718

TEST_MAPPINGD04-Jul-2025604 2928

cargo_embargo.jsonD04-Jul-2025215 1211

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