tag | 040e7d6915cbab8dd78bed657f3d4110c4a2b5c0 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Apr 13 23:29:50 2022 -0700 |
object | c7a0ca3f7fc2a1505551536e0b90e0d209a2a824 |
Android Mainline 12.0.0 Release 63 (7993649,com.google.android.networkstack)
commit | c7a0ca3f7fc2a1505551536e0b90e0d209a2a824 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Tue Jun 22 10:30:25 2021 +0000 |
committer | Luke Huang <huangluke@google.com> | Wed Jun 23 09:02:13 2021 +0000 |
tree | 0ae352b18f96fcca3ce41cc57c7dc718af0a41e2 | |
parent | 5922e7ee56e0cbd4ea7e9f388b3de727c875f4a4 [diff] |
Make libslab available to DnsResolver Test: TH Bug 155855709 Original-Change: https://android-review.googlesource.com/1741280 Merged-In: If0d9c3862fcc9a24f3e3673e99557df62cb0a7b3 Change-Id: If0d9c3862fcc9a24f3e3673e99557df62cb0a7b3
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.