commit | b29dfafb7d4ca784aa22e716447d01e32ccf94e2 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Wed Apr 28 08:50:50 2021 -0700 |
committer | Joel Galenson <jgalenson@google.com> | Wed Apr 28 08:50:50 2021 -0700 |
tree | 95d23281f1be722c5e7ff14d322b70b0a5120db1 | |
parent | 0a7a6d9f18fd7296da3f742c9df91e08980782e6 [diff] |
Generate apex_available from c2a instead of a patch Test: Run c2a Test: Build Change-Id: I4d996e7849f369dfeebff0cccaa535cb843d39bc
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.