diff --git a/actix-connect/Cargo.toml b/actix-connect/Cargo.toml index 210bc75e..37b93c65 100644 --- a/actix-connect/Cargo.toml +++ b/actix-connect/Cargo.toml @@ -41,11 +41,10 @@ either = "1.5.3" futures-util = { version = "0.3.4", default-features = false } # FIXME: Use release version http = { git = "https://github.com/paolobarbolini/http.git", branch = "bytes06", optional = true } -#http = { version = "0.2.0", optional = true } log = "0.4" -tokio-compat-02 = "0.1.2" -trust-dns-proto = { version = "0.19", default-features = false, features = ["tokio-runtime"] } -trust-dns-resolver = { version = "0.19", default-features = false, features = ["tokio-runtime", "system-config"] } +# FIXME: Use release version +trust-dns-proto = { git = "https://github.com/bluejekyll/trust-dns", branch = "main", default-features = false, features = ["tokio-runtime"] } +trust-dns-resolver = { git = "https://github.com/bluejekyll/trust-dns", branch = "main", default-features = false, features = ["tokio-runtime", "system-config"] } # openssl open-ssl = { package = "openssl", version = "0.10", optional = true } @@ -59,3 +58,4 @@ webpki = { version = "0.21", optional = true } [dev-dependencies] bytes = "0.6" actix-testing = "1.0.0" +futures-util = { version = "0.3.4", default-features = false, features = ["sink"] } diff --git a/actix-connect/src/lib.rs b/actix-connect/src/lib.rs index 119027f9..127f0a16 100644 --- a/actix-connect/src/lib.rs +++ b/actix-connect/src/lib.rs @@ -43,9 +43,7 @@ pub async fn start_resolver( cfg: ResolverConfig, opts: ResolverOpts, ) -> Result { - // FIXME: remove compat layer - use tokio_compat_02::FutureExt; - Ok(AsyncResolver::tokio(cfg, opts).compat().await?) + Ok(AsyncResolver::tokio(cfg, opts)?) } struct DefaultResolver(AsyncResolver); @@ -62,9 +60,7 @@ pub(crate) async fn get_default_resolver() -> Result ResolverFuture { ResolverFuture { lookup: Box::pin(async move { let resolver = resolver_clone; - // FIXME: Remove compat layer - use tokio_compat_02::FutureExt; - resolver.lookup_ip(host_clone).compat().await + resolver.lookup_ip(host_clone).await }), req: Some(req), } diff --git a/actix-server/src/builder.rs b/actix-server/src/builder.rs index e2a38d92..c849f09e 100644 --- a/actix-server/src/builder.rs +++ b/actix-server/src/builder.rs @@ -286,7 +286,7 @@ impl ServerBuilder { // handle signals if !self.no_signals { - Signals::start(self.server.clone()).unwrap(); + Signals::start(self.server.clone()); } // start http server actor diff --git a/actix-server/src/signals.rs b/actix-server/src/signals.rs index b44504c5..72208e14 100644 --- a/actix-server/src/signals.rs +++ b/actix-server/src/signals.rs @@ -1,5 +1,4 @@ use std::future::Future; -use std::io; use std::pin::Pin; use std::task::{Context, Poll}; @@ -28,7 +27,7 @@ pub(crate) struct Signals { } impl Signals { - pub(crate) fn start(srv: Server) -> io::Result<()> { + pub(crate) fn start(srv: Server) { #[cfg(not(unix))] { actix_rt::spawn(Signals { @@ -60,10 +59,8 @@ impl Signals { } } - actix_rt::spawn(Signals { srv, streams }) + actix_rt::spawn(Signals { srv, streams }); } - - Ok(()) } }