commit | 3d49a1426a0aa3fce6301515460e4d5ef6f3f7b3 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Jun 15 20:10:11 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jun 15 20:10:11 2022 +0000 |
tree | 619b140d4e933acdbc6d87f524856c1a682011ad | |
parent | 90379817dbf4ad0d10cb461bdf52eb754283c63a [diff] | |
parent | 5d58760a0ad2aa7741270473fab5299fcb1239b0 [diff] |
Merge "Update TEST_MAPPING" am: 5d58760a0a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/2123297 Change-Id: I56e8eaff7dd7e5aaf496b23d3a403a6eb1620c29 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.