Go to file
openharmony_ci 9ae9d2b1a5
!2 README.OpenSource 中License信息整改
Merge pull request !2 from peizhe/master
2023-05-05 02:26:40 +00:00
.github/workflows Update MIRIFLAGS 2022-07-09 15:41:30 +09:00
src Restructure early break in recreate_vacant_list() (#132) 2023-02-19 13:03:39 +09:00
tests Fixed documentation/test bug about overflow (#124) 2022-11-02 13:40:14 +01:00
.gitignore Remove .swp file 2016-01-18 10:25:42 -08:00
BUILD.gn Add GN Build Files and Custom Modifications 2023-04-18 19:12:37 +08:00
build.rs Use #[track_caller] on Rust 1.46+ 2022-07-10 02:21:12 +09:00
Cargo.toml Release v0.4.8 (#133) 2023-02-19 18:23:54 +01:00
CHANGELOG.md Release v0.4.8 (#133) 2023-02-19 18:23:54 +01:00
LICENSE Bump version to v0.4.2 2019-01-11 15:08:54 -08:00
README.md Fix CI badge (#127) 2022-12-17 16:03:47 +09:00
README.OpenSource README.OpenSource 中License信息整改 2023-05-04 10:57:34 +08:00

Slab

Pre-allocated storage for a uniform data type.

Crates.io Build Status

Documentation

Usage

To use slab, first add this to your Cargo.toml:

[dependencies]
slab = "0.4"

Next, add this to your crate:

use slab::Slab;

let mut slab = Slab::new();

let hello = slab.insert("hello");
let world = slab.insert("world");

assert_eq!(slab[hello], "hello");
assert_eq!(slab[world], "world");

slab[world] = "earth";
assert_eq!(slab[world], "earth");

See documentation for more details.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in slab by you, shall be licensed as MIT, without any additional terms or conditions.