From 5d9af5d171a14cdad1be42b60cf3a5a3813ba91d Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Tue, 3 Oct 2023 07:53:47 -0400 Subject: [PATCH] fix trust-dns error kind on windows --- src/dns/trust_dns.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dns/trust_dns.rs b/src/dns/trust_dns.rs index 3a5abda81..5af17cd67 100644 --- a/src/dns/trust_dns.rs +++ b/src/dns/trust_dns.rs @@ -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 { - 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)) }