tag | 548ca15f8d1f6afcb40c37742728b04fb4f01132 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Oct 20 23:07:50 2023 -0700 |
object | 537c479d20a13beed92d178dc58c711fc4ffcea6 |
aml_rkp_341012000 (10668899,com.google.android.rkpd)
commit | 537c479d20a13beed92d178dc58c711fc4ffcea6 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:25:40 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:25:40 2023 +0000 |
tree | 7f08bb33b7d46ae8a14a9f02449fada34d5375b2 | |
parent | a70260c0cb3947f2cc09004b7ae9b79f011878a2 [diff] | |
parent | 52a25c5a6a55a55b1fb617cfd856988d4ccee621 [diff] |
Snap for 10453563 from 52a25c5a6a55a55b1fb617cfd856988d4ccee621 to mainline-rkpd-release Change-Id: I6450e574c7b815be669cb93ae02de0a823b5d221
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.