Add rust_test modules and TEST_MAPPING

* Two 'slab' tests in src and tests directory cannot
  be merged. So they have different module names.

Bug: 156009151
Test: atest --host --rebuild-module-info -c --include-subdirs external/rust/crates
Change-Id: I988a4129d9ed1ff627d98ce6dba990fbdd549262
2 files changed
tree: 8d8fc468a6d5cc67e70f968c9cd2080310f13c7f
  1. .cargo_vcs_info.json
  2. .gitignore
  3. Android.bp
  4. CHANGELOG.md
  5. Cargo.toml
  6. Cargo.toml.orig
  7. LICENSE
  8. METADATA
  9. MODULE_LICENSE_MIT
  10. OWNERS
  11. README.md
  12. TEST_MAPPING
  13. src/
  14. tests/
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.2"

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.