commit | afbe67421f0e703c08d6b868fd707b06b3997e5f | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Mon Nov 29 14:05:26 2021 -0800 |
committer | Joel Galenson <jgalenson@google.com> | Fri Dec 10 15:33:30 2021 -0800 |
tree | f1525b6ccaaf8350084ace726abc9a6e4048a674 | |
parent | d7ade33e6697488fe718009710a084bcd9b387ae [diff] |
Refresh Android.bp, cargo2android.json, TEST_MAPPING. Test: None Change-Id: Ie4cc43fa5648153788601625a8a28848f6f6d277
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.