commit | 65ec2cb4e9148524119d28ae69bcf6611dad45d9 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Tue Jul 14 01:52:28 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jul 14 01:52:28 2020 +0000 |
tree | 01834bcf0e76d513cfdf55ab9d0cd6de5690154f | |
parent | 02cb305d079a1583ca476d34910f73cfbbceb240 [diff] | |
parent | b6baf69d32d090b9d0c870a44c11589de30302d6 [diff] |
Regenerate Android.bp with new cargo2android.py am: b6baf69d32 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1362336 Change-Id: I2d5a18bf960432a683ee2eba1ed7608f1b2b4840
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.