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

@ -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))
}
}