commit | f7618c7eae01eccb7b9ab9186bf8dfdde149683e | [log] [tgz] |
---|---|---|
author | James Farrell <jamesfarrell@google.com> | Tue Aug 06 17:04:49 2024 +0000 |
committer | James Farrell <jamesfarrell@google.com> | Tue Aug 06 17:04:49 2024 +0000 |
tree | bfae8309c3553f359db2e0091763333a42ee650c | |
parent | 1339d2e99896ee16c46ba4a3e516b46772892a49 [diff] |
Update Android.bp by running cargo_embargo Test: ran cargo_embargo Change-Id: Ie8c308abf2a82e75eaa69dc1fcf3c1556da6626a
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.