commit | 3cda92df628fdd66fd2bca5f1778b18367dbc160 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Tue Aug 24 19:30:14 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Aug 24 19:30:14 2021 +0000 |
tree | 93a966a35a7baf25c7751de48838d19b36dd7901 | |
parent | d78ba363fe21106c7616e908fb92789528137958 [diff] | |
parent | 54d4dd594988195697e5a4fdcf0af0be8d903b7b [diff] |
Update TEST_MAPPING am: 5b201ad538 am: d7ade33e66 am: 54d4dd5949 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1805600 Change-Id: If5d301b6304e863ca382258dc1c10ada9ee22959
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4"
Next, add this to your crate:
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.