Bump dep trust-dns-reslver to v0.23.0 (#1432)

* Bump dep trust-dns-reslver to v0.23.0

Since we no longer enables `reqwest/trust-dns-resolver` anymore, we
don't need to keep this dependency is sync with upstream `reqwest`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix compilation

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-09-30 11:12:27 +10:00 committed by GitHub
parent 8e08c65946
commit a69beccf1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 95 additions and 168 deletions

View file

@ -37,7 +37,7 @@ tokio-tar = "0.3.0"
tokio-util = { version = "0.7.8", features = ["io"] }
tracing = "0.1.37"
# trust-dns-resolver must be kept in sync with the version reqwest uses
trust-dns-resolver = { version = "0.22.0", optional = true, features = ["dnssec-ring"] }
trust-dns-resolver = { version = "0.23.0", optional = true, features = ["dnssec-ring"] }
hyper = { version = "0.14.27", optional = true }
once_cell = { version = "1.18.0", optional = true }
url = "2.3.1"

View file

@ -26,8 +26,7 @@ impl Resolve for TrustDnsResolver {
fn new_resolver() -> Result<TokioAsyncResolver, Box<dyn std::error::Error + Send + Sync>> {
#[cfg(unix)]
{
let (config, opts) = trust_dns_resolver::system_conf::read_system_conf()?;
Ok(TokioAsyncResolver::tokio(config, opts)?)
Ok(TokioAsyncResolver::tokio_from_system_conf()?)
}
#[cfg(windows)]
{
@ -52,7 +51,7 @@ fn new_resolver() -> Result<TokioAsyncResolver, Box<dyn std::error::Error + Send
socket_addr,
protocol,
tls_dns_name: None,
trust_nx_responses: false,
trust_negative_responses: false,
#[cfg(feature = "rustls")]
tls_config: None,
bind_addr: None,
@ -60,6 +59,6 @@ fn new_resolver() -> Result<TokioAsyncResolver, Box<dyn std::error::Error + Send
}
});
Ok(TokioAsyncResolver::tokio(config, opts)?)
Ok(TokioAsyncResolver::tokio(config, opts))
}
}