commit | 5a6f0e6d5332f5a782b2556e219955b3e60ef1af | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Tue Mar 07 11:14:12 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Mar 07 11:14:12 2023 +0000 |
tree | 34d25291686de73533cbd5577f62fa9c248dbc0d | |
parent | 7a23d73b3bed88131d93d3b98859f2302d4748cb [diff] | |
parent | 8e9c2ac0430db6117661aa2b466568b101325707 [diff] |
Upgrade slab to 0.4.8 am: b518a04a6e am: 8e9c2ac043 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/2470101 Change-Id: If0d80d54ad96b759573e028da9e74fb54ff32f21 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.