commit | dc3e744fd1c120eeecfd40613de3396c2f286625 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Thu Aug 12 21:56:03 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Aug 12 21:56:03 2021 +0000 |
tree | d491e6133a10e7ac0f7aec3e5d2fe25cc87e92b7 | |
parent | afdb0000da717ae01d19f2313bc0ae580a2e430d [diff] | |
parent | a50483a56911ab7ade78b609364bfdc05af4e7b8 [diff] |
Upgrade rust/crates/slab to 0.4.4 am: bf78b2784b am: 48091efd68 am: 3309edccc3 am: d4b7f41124 am: a50483a569 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1791008 Change-Id: I0cc507891f2e08952618a5ea21f123ac0663ca84
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.