commit | fb33e50875985f11621529d0d171c9b50c702d88 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Sat Apr 18 04:51:37 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Sat Apr 18 04:51:37 2020 +0000 |
tree | 00a64d7fbec9239ab7c3f4df0432759bd2332b9b | |
parent | a41d5160620e9d6e6267f09901a1acdc8079a979 [diff] | |
parent | 651235fb5615a6361f6ba6c9f052afee0e9f2590 [diff] |
Add OWNERS and fix version string am: 467e34c698 am: 045d5ca01f am: f54b34d6bf am: f715128b0f am: 651235fb56 Change-Id: Id90f1128e10b5fd30d2a169c4b4164b0868a1b9d
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.