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