commit | 5f8545e2164d5dbaf0dde5b12cbd3ae5dd16e445 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Fri Jul 17 16:54:17 2020 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Fri Jul 17 16:54:17 2020 -0700 |
tree | ed3d22c3522b68e4a3b2ea12dca9f0fd1b56acdb | |
parent | 35b33df2ad98988f06940faf37dfb42e64bdaaef [diff] |
Share srcs in rust_defaults Test: atest -c --include-subdirs external/rust/crates Change-Id: Ie8750203e36ed7fc455cf3ccf9e57beb51b25fe4
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.