commit | 8a11363db24991af64d16e219b28a578e349537f | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Wed Feb 17 20:31:00 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Feb 17 20:31:00 2021 +0000 |
tree | e72c75b0dcb032e797acd754627d443269ba5076 | |
parent | c3938cb17a2bc64ad96d224a0f58ac6517f09b62 [diff] | |
parent | 69794e5c4b2788974fbfb94179bbaa9e0de8937e [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/slab am: 5cd40c3a03 am: e1225f2337 am: 6add6aaa62 am: 69794e5c4b Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1588814 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I28169b08002ff5129affcc7e35a43751cbeb4b67
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.