Skip to content

Commit

Permalink
fix trust-dns error kind on windows (#1992)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar authored Oct 3, 2023
1 parent d050e60 commit afc3a93
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/dns/trust_dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ impl Iterator for SocketAddrs {
/// Create a new resolver with the default configuration,
/// which reads from `/etc/resolve.conf`.
fn new_resolver() -> io::Result<TokioAsyncResolver> {
let (config, opts) = system_conf::read_system_conf()
.map_err(|e| io::Error::new(e.kind(), format!("error reading DNS system conf: {}", e)))?;
let (config, opts) = system_conf::read_system_conf().map_err(|e| {
io::Error::new(
io::ErrorKind::Other,
format!("error reading DNS system conf: {}", e),
)
})?;
Ok(TokioAsyncResolver::tokio(config, opts))
}

0 comments on commit afc3a93

Please sign in to comment.