tag | 4b8325b76bb4da6e43b4f08ddeaf24506a1827d4 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Oct 20 15:39:33 2023 -0700 |
object | 49b711648cc5cff10510e2faaea507309cff7a4c |
aml_adb_340912000 (10491836,com.google.android.adbd)
commit | 49b711648cc5cff10510e2faaea507309cff7a4c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon Jul 03 15:56:21 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon Jul 03 15:56:21 2023 +0000 |
tree | 7f08bb33b7d46ae8a14a9f02449fada34d5375b2 | |
parent | 3b04d31ebb17d64684a77a1d1b91c78be2dad11d [diff] | |
parent | 52a25c5a6a55a55b1fb617cfd856988d4ccee621 [diff] |
Snap for 10428683 from 52a25c5a6a55a55b1fb617cfd856988d4ccee621 to mainline-adbd-release Change-Id: I72be5a7ef40ab838ffee5cbd228152e77e869207
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.