Snap for 7482983 from b5c7cbc627fcac14a30fafdd55cd4a41aff9214b to tm-release

Change-Id: I7a6c137ad3eeb1d3bf7ca33421f3872c4369873b
tree: e15fe45d4e6fb5f8b1df21c0137acbb9390fd036
  1. .github/
  2. patches/
  3. src/
  4. tests/
  5. .cargo_vcs_info.json
  6. .clippy.toml
  7. .gitignore
  8. Android.bp
  9. Cargo.toml
  10. Cargo.toml.orig
  11. cargo2android.json
  12. CHANGELOG.md
  13. LICENSE
  14. METADATA
  15. MODULE_LICENSE_MIT
  16. OWNERS
  17. README.md
  18. TEST_MAPPING
README.md

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.3"

Next, add this to your crate:

extern crate slab;

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.