feat(WIP): change relevant types

This commit is contained in:
XOR-op
2023-05-19 16:34:31 +08:00
committed by Benjamin Fry
parent 0901b1d591
commit 5ab85e297d
13 changed files with 198 additions and 194 deletions

View File

@@ -3,10 +3,11 @@
//! This example shows how to create a resolver that uses the tokio multithreaded runtime. This is how
//! you might integrate the resolver into a more complex application.
use trust_dns_resolver::name_server::TokioConnectionProvider;
#[cfg(all(feature = "tokio-runtime", feature = "system-config"))]
fn main() {
use tokio::runtime::Runtime;
use trust_dns_resolver::name_server::TokioRuntimeProvider;
use trust_dns_resolver::TokioAsyncResolver;
tracing_subscriber::fmt::init();
@@ -19,7 +20,7 @@ fn main() {
#[cfg(any(unix, windows))]
{
// use the system resolver configuration
TokioAsyncResolver::from_system_conf(TokioRuntimeProvider::new())
TokioAsyncResolver::from_system_conf(TokioConnectionProvider::default())
}
// For other operating systems, we can use one of the preconfigured definitions