make errors generic in DnsHandle for Resolver

This commit is contained in:
Benjamin Fry
2020-09-07 10:17:01 -07:00
parent 48f625ad0d
commit 248fd8709b
26 changed files with 490 additions and 270 deletions

View File

@@ -7,9 +7,9 @@
use std::future::Future;
use trust_dns_resolver::proto::error::ProtoError;
use trust_dns_resolver::proto::Executor;
use trust_dns_resolver::error::ResolveError;
use trust_dns_resolver::name_server::{
GenericConnection, GenericConnectionProvider, RuntimeProvider, Spawn,
};
@@ -62,7 +62,7 @@ pub struct AsyncStdRuntimeHandle;
impl Spawn for AsyncStdRuntimeHandle {
fn spawn_bg<F>(&mut self, future: F)
where
F: Future<Output = Result<(), ProtoError>> + Send + 'static,
F: Future<Output = Result<(), ResolveError>> + Send + 'static,
{
let _join = async_std::task::spawn(future);
}