commit | 4c0762ad366ced4e286e72044a6d53a8b532358b | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Thu Nov 05 16:59:33 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Nov 05 16:59:33 2020 +0000 |
tree | f865d7a89806ca82f268b07460e74266336bf724 | |
parent | f027af41df70f031162a288c395846352e5cfc8a [diff] | |
parent | 9f59d1aabc1d93bfe216e0af924d1fa642bc672e [diff] |
TEST_MAPPING: test dependers of this crate am: 9f59d1aabc Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1488726 Change-Id: I33d7a7d9579718c0c38a9e34c8ca85110b2c96fa
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.