commit | 8732ec5c287ef17eb84199413162bdaa436af39b | [log] [tgz] |
---|---|---|
author | Ivan Lozano <ivanlozano@google.com> | Mon Jun 15 09:28:14 2020 -0400 |
committer | Ivan Lozano <ivanlozano@google.com> | Mon Jun 15 09:28:14 2020 -0400 |
tree | 91135f117f1142bd707c4104546bcbc38bbf4900 | |
parent | 8bf358dca37fa62a8245744ede08e9308b46f0da [diff] |
Correct the targets in libslab's TEST_MAPPING. Bug: 158500462 Test: atest --host -c Change-Id: I5a4a6a02af3873fea59b6c660b076b3c2c86f38a
Pre-allocated storage for a uniform data type.
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.
This project is licensed under the MIT license.
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.