commit | f7e2258c0ff28fbdda8e568c83bb27b87f8c39f8 | [log] [tgz] |
---|---|---|
author | Ivan Lozano <ivanlozano@google.com> | Mon Jun 15 16:10:58 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Jun 15 16:10:58 2020 +0000 |
tree | 91135f117f1142bd707c4104546bcbc38bbf4900 | |
parent | 9c95f29b04a005b23bbe53fd5f7b9d4101895f6a [diff] | |
parent | 92cc96ca53b23a5c0622fad6f4a00ab58b2c1f90 [diff] |
Correct the targets in libslab's TEST_MAPPING. am: 8732ec5c28 am: 08b81de9e3 am: 42cb57b5ec am: 706836c6e3 am: 92cc96ca53 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1336660 Change-Id: I8000e80317912e75a914e77a83b60f222db7c4c3
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.