commit | b4e93025d7e7882e0bd8dba9bacbde4a3c5f098a | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Tue May 31 16:45:52 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue May 31 16:45:52 2022 +0000 |
tree | 90a3e3a6412fff3804630f7ddbccabdf806fb3b9 | |
parent | de61eb3934f4b364865f66c12b1f5149e8f06958 [diff] | |
parent | 90379817dbf4ad0d10cb461bdf52eb754283c63a [diff] |
Update TEST_MAPPING am: daac807730 am: 90379817db Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/2108606 Change-Id: Ic66aee94c9f341c23297caa820648d65e3373cb2 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.