• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

benches/25-Apr-2025-313268

debug_metadata/25-Apr-2025-147115

scripts/25-Apr-2025-2512

src/25-Apr-2025-3,5382,440

tests/25-Apr-2025-9471

.cargo-checksum.jsonD25-Apr-20251.3 KiB11

Android.bpD25-Apr-2025869 3329

Cargo.tomlD25-Apr-20251.6 KiB7363

LICENSED25-Apr-202510.6 KiB202169

LICENSE-APACHED25-Apr-202510.6 KiB202169

LICENSE-MITD25-Apr-20251 KiB2622

METADATAD25-Apr-2025421 1817

MODULE_LICENSE_APACHE2D25-Apr-20250

README.mdD25-Apr-2025649 2718

TEST_MAPPINGD25-Apr-2025586 2928

cargo_embargo.jsonD25-Apr-202585 87

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