commit | a72eba52b13422beaddf7d2c5c0ac916c9d30500 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Wed Apr 28 21:52:41 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Apr 28 21:52:41 2021 +0000 |
tree | 95d23281f1be722c5e7ff14d322b70b0a5120db1 | |
parent | d25350966f0833c76baf563a31a9afcb518cb57e [diff] | |
parent | c220647ac7ff7f46ced8eabc05f0eea5f4c01a63 [diff] |
Generate apex_available from c2a instead of a patch am: b29dfafb7d am: c220647ac7 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1690025 Change-Id: I18517a1539d8b957d9dceb164434e7df321f08e5
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4.2"
Next, add this to your crate:
extern crate slab; 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.