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

..--

benches/23-Nov-2023-297253

patches/23-Nov-2023-1413

scripts/23-Nov-2023-2210

src/23-Nov-2023-2,9232,067

tests/23-Nov-2023-2518

.cargo_vcs_info.jsonD23-Nov-202374 65

.gitignoreD23-Nov-202338 43

.travis.ymlD23-Nov-2023947 3837

Android.bpD23-Nov-20231.7 KiB5147

Cargo.tomlD23-Nov-20231.1 KiB3835

Cargo.toml.origD23-Nov-2023649 2622

LICENSED23-Nov-202310.6 KiB202169

LICENSE-APACHED23-Nov-202310.6 KiB202169

LICENSE-MITD23-Nov-20231 KiB2622

METADATAD23-Nov-2023418 2019

MODULE_LICENSE_APACHE2D23-Nov-20230

OWNERSD23-Nov-202340 21

README.mdD23-Nov-2023649 2718

TEST_MAPPINGD23-Nov-2023147 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