commit | eb50abb49786dae3ce91cc3d16646737147c18a7 | [log] [tgz] |
---|---|---|
author | Andrew Walbran <qwandor@google.com> | Tue Jun 09 15:18:06 2020 +0100 |
committer | Andrew Walbran <qwandor@google.com> | Mon Jun 15 16:07:42 2020 +0100 |
tree | 24c395e8d37c85ca3edb894c0e2378941570a59a | |
parent | 8732ec5c287ef17eb84199413162bdaa436af39b [diff] |
Allow building for device. Ran 'cargo2android.py --run --device --test'. Bug: 158290206 Test: atest -c -m --include-subdirs . Change-Id: I03ab7655d85d2f7641822a4cb0f997f2ffaf0884
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.