Skip to content

Commit 086e942

Browse files
committed
refactor: cleanup
1 parent 64f7865 commit 086e942

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

iroh-dns/src/resolve.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use anyhow::Result;
44
use hickory_proto::error::ProtoError;
55
use hickory_resolver::{
66
config::{NameServerConfigGroup, ResolverConfig, ResolverOpts},
7-
name_server::{GenericConnector, TokioRuntimeProvider},
8-
AsyncResolver, Name,
7+
AsyncResolver, Name, TokioAsyncResolver,
98
};
109
use iroh_net::{AddrInfo, NodeAddr, NodeId};
1110
use tracing::debug;
@@ -19,8 +18,6 @@ pub const IROH_TEST_DNS_IPV4: Ipv4Addr = Ipv4Addr::new(5, 75, 181, 3);
1918
pub const IROH_TEST_DOMAIN: &str = "testdns.iroh.link.";
2019
pub const EXAMPLE_DOMAIN: &str = "irohdns.example.";
2120

22-
pub type HickoryResolver = AsyncResolver<GenericConnector<TokioRuntimeProvider>>;
23-
2421
/// Resolver config
2522
pub struct Config {
2623
name_servers: NameServerConfigGroup,
@@ -67,8 +64,8 @@ impl Config {
6764
#[derive(derive_more::Debug, Clone)]
6865
pub struct Resolver {
6966
default_node_origin: Name,
70-
#[debug("HickoryResolver")]
71-
dns_resolver: HickoryResolver,
67+
#[debug("TokioAsyncResolver")]
68+
dns_resolver: TokioAsyncResolver,
7269
}
7370

7471
impl Resolver {
@@ -85,7 +82,7 @@ impl Resolver {
8582
})
8683
}
8784

88-
pub fn resolver(&self) -> &HickoryResolver {
85+
pub fn resolver(&self) -> &TokioAsyncResolver {
8986
&self.dns_resolver
9087
}
9188

0 commit comments

Comments
 (0)