tag | 9629872657a2f6b7b0ee45e7572cb0dd051b7732 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Jun 08 14:19:19 2020 -0700 |
object | 210e1bfc543023d06763707efdde7dad52b44172 |
Platform Tools Release 30.0.1 (6435776)
commit | 210e1bfc543023d06763707efdde7dad52b44172 | [log] [tgz] |
---|---|---|
author | android-build-prod (mdb) <android-build-team-robot@google.com> | Mon Apr 27 21:47:22 2020 +0000 |
committer | android-build-prod (mdb) <android-build-team-robot@google.com> | Mon Apr 27 21:47:22 2020 +0000 |
tree | 00a64d7fbec9239ab7c3f4df0432759bd2332b9b | |
parent | 47302c2131156b31d7c6d8a9d5dbd9e79b92d613 [diff] | |
parent | 467e34c698f25cd8a596ca3f894d0ec0dcf84452 [diff] |
Snap for 6435660 from 467e34c698f25cd8a596ca3f894d0ec0dcf84452 to sdk-release Change-Id: If8cad469cc37a7c46e2b3cdf80ad72f7f26554bd
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4.2"
Next, add this to your crate:
extern crate slab; 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.