commit | 69ed335b885f4f3a56e4571e170f922970d0a1d5 | [log] [tgz] |
---|---|---|
author | James Farrell <jamesfarrell@google.com> | Wed Aug 07 21:54:15 2024 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Aug 07 21:54:15 2024 +0000 |
tree | bfae8309c3553f359db2e0091763333a42ee650c | |
parent | 060614b8c7c5bb22228e8fe6cc89c3a977df37d8 [diff] | |
parent | f7618c7eae01eccb7b9ab9186bf8dfdde149683e [diff] |
Update Android.bp by running cargo_embargo am: f7618c7eae Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/3208938 Change-Id: I85e64b748aeabe07f85d3eac8b17b1de16836352 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.