• Home
Name Date Size #Lines LOC

..--

benches/03-May-2024-297253

patches/03-May-2024-1413

scripts/03-May-2024-2210

src/03-May-2024-2,9232,067

tests/03-May-2024-2518

.cargo_vcs_info.jsonD03-May-202474 65

.gitignoreD03-May-202438 43

.travis.ymlD03-May-2024947 3837

Android.bpD03-May-20241.7 KiB5147

Cargo.tomlD03-May-20241.1 KiB3835

Cargo.toml.origD03-May-2024649 2622

LICENSED03-May-202410.6 KiB202169

LICENSE-APACHED03-May-202410.6 KiB202169

LICENSE-MITD03-May-20241 KiB2622

METADATAD03-May-2024418 2019

MODULE_LICENSE_APACHE2D03-May-20240

OWNERSD03-May-202440 21

README.mdD03-May-2024649 2718

TEST_MAPPINGD03-May-2024147 98

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