• Home
Name Date Size #Lines LOC

..--

.github/workflows/06-Sep-2024-11392

benches/06-Sep-2024-313268

debug_metadata/06-Sep-2024-147115

scripts/06-Sep-2024-2512

src/06-Sep-2024-3,5382,440

tests/06-Sep-2024-9471

.cargo_vcs_info.jsonD06-Sep-202494 66

.gitignoreD06-Sep-202447 54

Android.bpD06-Sep-20242 KiB6157

Cargo.tomlD06-Sep-20241.6 KiB7363

Cargo.toml.origD06-Sep-20241.4 KiB5144

LICENSED06-Sep-202410.6 KiB202169

LICENSE-APACHED06-Sep-202410.6 KiB202169

LICENSE-MITD06-Sep-20241 KiB2622

METADATAD06-Sep-2024649 2119

MODULE_LICENSE_APACHE2D06-Sep-20240

OWNERSD06-Sep-202440 21

README.mdD06-Sep-2024649 2718

TEST_MAPPINGD06-Sep-2024625 3029

cargo_embargo.jsonD06-Sep-2024224 1413

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