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