commit | c03c72f058cd85215e0767b80e89a854a87da8b2 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Wed May 19 17:19:30 2021 -0700 |
committer | Joel Galenson <jgalenson@google.com> | Tue Jun 08 13:20:13 2021 -0700 |
tree | 0dcab013f19a5df6b8d8fc42f5ec73b39ca3dc22 | |
parent | b29dfafb7d4ca784aa22e716447d01e32ccf94e2 [diff] |
Upgrade rust/crates/slab to 0.4.3 Test: make Change-Id: I888226f7b220e80f6910a8ac79165c6eeb6b95c6
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4.3"
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.