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