commit | 320318fcfd3015e925351de2d016c5f0887004b9 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 05 09:57:25 2022 -0700 |
committer | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 05 09:57:25 2022 -0700 |
tree | 619b140d4e933acdbc6d87f524856c1a682011ad | |
parent | 93dedf47032e77b2a2f22e4a3840dd6009986a21 [diff] | |
parent | f4a2cfeeb4060b6b5e2cbf439f132109e24f2db0 [diff] |
Merge f4a2cfeeb4060b6b5e2cbf439f132109e24f2db0 on remote branch Change-Id: Ia697d65a89b026fd3f211ad25505e40f0018edf5
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.