commit | bc151bf4ff758ef4eaccdd30cdb9e6939c1ecbbc | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Feb 05 21:00:43 2024 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Feb 05 21:00:43 2024 +0000 |
tree | c1ff49d9f891c42704a17d7486b034dbed218e1a | |
parent | b1e9ec39ed707bd4e559d3e6d29faee5782ffd0c [diff] | |
parent | f4a1151ee3613c367a52e8c4ba02ce90c2cd0678 [diff] |
Upgrade slab to 0.4.9 am: f4a1151ee3 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/2949489 Change-Id: I19359c51ba4c47ee5746579558d3e79922d83486 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.