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

..03-May-2022-

benches/H03-May-2022-297253

scripts/H03-May-2022-2210

src/H03-May-2022-2,8792,043

tests/H03-May-2022-2518

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D11-Aug-202074 65

.gitignoreH A D05-Jun-202038 43

.travis.ymlH A D13-Jul-20201.1 KiB4544

Cargo.tomlH A D11-Aug-20201.1 KiB3835

Cargo.toml.orig-cargoH A D11-Aug-2020649 2622

LICENSE-APACHEH A D10-Dec-201910.6 KiB202169

LICENSE-MITH A D10-Dec-20191 KiB2622

README.mdH A D23-Jan-2020649 2718

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