commit | 4f891a664135c7c160b24e881a160dcde6ed6ad1 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Tue Jan 31 19:52:07 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jan 31 19:52:07 2023 +0000 |
tree | ddb3e944cc30551b2db1d7636ea1529d73c0666d | |
parent | 93ed5d90319ea63a04822073269c35a271e98424 [diff] | |
parent | 1ea08d4c4bfca8c339c3f195533e572ffe49b6d2 [diff] |
Update TEST_MAPPING am: 1ea08d4c4b Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/2411817 Change-Id: Ia64b06c4c6adacf00643f2adaf3bc79108fb05d6 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.