tag | a83fb7c79dd3c3fa986af9b498f610d73e2ba0c6 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Jan 30 14:48:16 2024 -0800 |
object | 293bfd04792b51417f17df110b6043c91b7a5a4f |
Platform Tools Release 34.0.5 (10900879)
commit | 293bfd04792b51417f17df110b6043c91b7a5a4f | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 28 13:34:14 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 28 13:34:14 2023 +0000 |
tree | 7f08bb33b7d46ae8a14a9f02449fada34d5375b2 | |
parent | b9fef1e116f99125871c21d31c3c3402e7634dec [diff] | |
parent | 37a29094c1c3e2e4646bbe1c905f9e0edcdf1f6c [diff] |
Snap for 10399941 from 37a29094c1c3e2e4646bbe1c905f9e0edcdf1f6c to sdk-release Change-Id: Id570a07b214a7d337f0f1ae612b889d2c9ae633c
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.