commit | 35b33df2ad98988f06940faf37dfb42e64bdaaef | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Tue Jul 14 16:45:19 2020 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Tue Jul 14 16:45:19 2020 -0700 |
tree | b01943383c2de1888e331457a5ed790eff563cc4 | |
parent | b6baf69d32d090b9d0c870a44c11589de30302d6 [diff] |
Regenerate Android.bp with new cargo2android.py * Now with more readable rust_defaults module names. Test: make Change-Id: I0126a484307703bf6d76810105b023b5e301b051
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.