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