commit | b5c7cbc627fcac14a30fafdd55cd4a41aff9214b | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Tue Jun 22 10:57:17 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jun 22 10:57:17 2021 +0000 |
tree | e15fe45d4e6fb5f8b1df21c0137acbb9390fd036 | |
parent | 202d85cc4f1e7bf05e0c9c5857f419a75e708c20 [diff] | |
parent | 28db7d4d2106ee2a9baed420752b84650414eb09 [diff] |
Merge "Make libslab available to DnsResolver" am: 14f54f0344 am: c4dc3da5a3 am: 31fb06ec29 am: 28db7d4d21 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1741280 Change-Id: Ic526235a81ce1c8b462ed3772c1114b3d56d3af0
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4.3"
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.