commit | b6baf69d32d090b9d0c870a44c11589de30302d6 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Sun Jul 12 00:45:34 2020 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Mon Jul 13 15:59:30 2020 -0700 |
tree | 01834bcf0e76d513cfdf55ab9d0cd6de5690154f | |
parent | 28cd8cebb3ef5052d366cf1caad51b5f1f0bedc8 [diff] |
Regenerate Android.bp with new cargo2android.py Test: make Change-Id: I26b3de6c721c776bd685b85326cd5c9dd6d6b077
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.