commit | f4a1151ee3613c367a52e8c4ba02ce90c2cd0678 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Feb 05 09:58:08 2024 +0100 |
committer | Jeff Vander Stoep <jeffv@google.com> | Mon Feb 05 09:58:08 2024 +0100 |
tree | c1ff49d9f891c42704a17d7486b034dbed218e1a | |
parent | 4347594c5e6d984d16f0c9f9b8e0f20ce638a316 [diff] |
Upgrade slab to 0.4.9 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/rust/crates/slab For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I66cfc750d7a3980e109009ccb8aab637f80eda5a
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.