commit | b518a04a6e5387ea2a784bfa9ca6f44c06707b3a | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Mar 06 12:32:45 2023 +0100 |
committer | Jeff Vander Stoep <jeffv@google.com> | Mon Mar 06 12:32:45 2023 +0100 |
tree | 34d25291686de73533cbd5577f62fa9c248dbc0d | |
parent | 1ea08d4c4bfca8c339c3f195533e572ffe49b6d2 [diff] |
Upgrade slab to 0.4.8 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/slab For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: Ia57b329cf74c44ad9a8bcaf8ef176df4bea19dce
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.