CRF: merge impl and raise io::Error

Also fixed a redundant closure and a Rustfmt issue.
This commit is contained in:
Fantix King
2022-05-02 09:19:46 -04:00
committed by Benjamin Fry
parent 9b565da93a
commit fab0b6aa6e
3 changed files with 29 additions and 33 deletions

View File

@@ -438,7 +438,7 @@ impl<C: DnsHandle<Error = ResolveError>, P: ConnectionProvider<Conn = C>> AsyncR
/// Customizes the static hosts used in this resolver.
pub fn set_hosts(&mut self, hosts: Option<Hosts>) {
self.hosts = hosts.map(|hosts| Arc::new(hosts));
self.hosts = hosts.map(Arc::new);
}
lookup_fn!(