mirror of
https://github.com/NLnetLabs/domain.git
synced 2026-09-11 04:17:43 +02:00
Use hashbrown over std hash tables
`hashbrown` is no-std compatible!
This commit is contained in:
Generated
+8
-8
@@ -11,12 +11,6 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "allocator-api2"
|
||||
version = "0.2.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.102"
|
||||
@@ -286,6 +280,12 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
||||
|
||||
[[package]]
|
||||
name = "foreign-types"
|
||||
version = "0.3.2"
|
||||
@@ -441,7 +441,7 @@ version = "0.15.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
|
||||
dependencies = [
|
||||
"foldhash",
|
||||
"foldhash 0.1.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -450,7 +450,7 @@ version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"foldhash 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
+3
-3
@@ -49,7 +49,7 @@ arc-swap = { version = "1.7.0", optional = true }
|
||||
bytes = { version = "1.2", optional = true, default-features = false }
|
||||
chrono = { version = "0.4.35", optional = true, default-features = false } # 0.4.35 deprecates Duration::seconds()
|
||||
futures-util = { version = "0.3", optional = true }
|
||||
hashbrown = { version = "0.17.0", optional = true, default-features = false, features = ["allocator-api2", "inline-more"] } # 0.14.2 introduces explicit hashing
|
||||
hashbrown = { version = "0.17.0", optional = true, default-features = false, features = ["default-hasher", "inline-more"] }
|
||||
heapless = { version = "0.9.2", optional = true }
|
||||
libc = { version = "0.2.153", default-features = false, optional = true } # 0.2.79 is the first version that has IP_PMTUDISC_OMIT
|
||||
log = { version = "0.4.22", optional = true }
|
||||
@@ -73,7 +73,7 @@ tracing-subscriber = { version = "0.3.18", optional = true, features = ["env-fil
|
||||
default = ["std", "rand"]
|
||||
|
||||
# Support for libraries
|
||||
alloc = ["jiff/alloc", "octseq/alloc", "serde?/alloc"]
|
||||
alloc = ["dep:hashbrown", "jiff/alloc", "octseq/alloc", "serde?/alloc"]
|
||||
bumpalo = ["dep:bumpalo", "std"]
|
||||
bytes = ["dep:bytes", "octseq/bytes"]
|
||||
chrono = ["dep:chrono"]
|
||||
@@ -81,7 +81,7 @@ heapless = ["dep:heapless", "octseq/heapless"]
|
||||
rand = ["dep:rand"]
|
||||
serde = ["dep:serde", "octseq/serde"]
|
||||
smallvec = ["dep:smallvec", "octseq/smallvec"]
|
||||
std = ["alloc", "dep:hashbrown", "bumpalo?/std", "bytes?/std", "octseq/std", "jiff/std", "serde?/std"]
|
||||
std = ["alloc", "bumpalo?/std", "bytes?/std", "octseq/std", "jiff/std", "serde?/std"]
|
||||
tracing = ["dep:log", "dep:tracing"]
|
||||
|
||||
# Cryptographic backends
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#[cfg(feature = "alloc")]
|
||||
use alloc::collections::BTreeSet;
|
||||
#[cfg(feature = "std")]
|
||||
use std::collections::HashSet;
|
||||
#[cfg(feature = "alloc")]
|
||||
use hashbrown::HashSet;
|
||||
|
||||
use super::{
|
||||
ComposeSvcParamValue, LongSvcParam, ParseSvcParamValue, PushError,
|
||||
@@ -140,7 +140,7 @@ macro_rules! values_enum {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
#[cfg(feature = "alloc")]
|
||||
impl<SrcOcts, Octs> ScanSvcParamValue<SrcOcts, Octs>
|
||||
for AllValues<Octs>
|
||||
where
|
||||
@@ -2012,7 +2012,7 @@ impl<Octs: AsRef<[u8]>> TlsSupportedGroups<Octs> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
#[cfg(feature = "alloc")]
|
||||
impl<SrcOcts, Octs> ScanSvcParamValue<SrcOcts, Octs>
|
||||
for TlsSupportedGroups<Octs>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user