commit | 90379817dbf4ad0d10cb461bdf52eb754283c63a | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Tue May 31 15:54:23 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue May 31 15:54:23 2022 +0000 |
tree | 90a3e3a6412fff3804630f7ddbccabdf806fb3b9 | |
parent | 80de0bb1b2c9893402737f51dcd32ecd7b328cc0 [diff] | |
parent | daac80773084089e7f758dd5f3f3572bbf5566db [diff] |
Update TEST_MAPPING am: daac807730 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/2108606 Change-Id: Iee5195c5e24aab1bc9c2421db7762d7165f6c2fc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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.