commit | 17d9307c2258ffa1992c0e8c1ddeabe5496c60b7 | [log] [tgz] |
---|---|---|
author | Elisei Zamakhov <[email protected]> | Thu Jul 11 15:54:48 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Jul 11 15:54:48 2024 +0000 |
tree | ad992311c8e188f2baa7ddd3bb7d0f5a87eba6b7 | |
parent | c5ab0b052fa9e8bebae3704da39a0e262a703211 [diff] | |
parent | 6a77a441fefa631949700dbe063969488925388f [diff] |
Mark apex-available am: 6a77a441fe Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/3166178 Change-Id: I91b35175251c49d68dfdf692f1f856d806353629 Signed-off-by: Automerger Merge Worker <[email protected]>
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.