From cde22e421821bf7804ddddf1a1e030ba697053d2 Mon Sep 17 00:00:00 2001 From: Maksym Vorobiov Date: Tue, 25 Feb 2020 00:56:52 +0200 Subject: [PATCH] Moved actix-http for actix from actix crate --- actix-http/Cargo.toml | 7 ++++++- actix-http/src/error.rs | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 10aa79d18..3ff70064b 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -15,7 +15,7 @@ license = "MIT/Apache-2.0" edition = "2018" [package.metadata.docs.rs] -features = ["openssl", "rustls", "failure", "compress", "secure-cookies"] +features = ["openssl", "rustls", "failure", "compress", "secure-cookies","actix"] [lib] name = "actix_http" @@ -39,6 +39,10 @@ failure = ["fail-ure"] # support for secure cookies secure-cookies = ["ring"] +# support for actix Actor messages +actix = ["actix"] +resolver = ["actix/resolver"] + [dependencies] actix-service = "1.0.1" actix-codec = "0.2.0" @@ -47,6 +51,7 @@ actix-utils = "1.0.3" actix-rt = "1.0.0" actix-threadpool = "0.3.1" actix-tls = { version = "1.0.0", optional = true } +actix = { version = "0.10.0-alpha.1", default_features = false, optional = true } base64 = "0.11" bitflags = "1.2" diff --git a/actix-http/src/error.rs b/actix-http/src/error.rs index c19aef2aa..5a2ecb09a 100644 --- a/actix-http/src/error.rs +++ b/actix-http/src/error.rs @@ -951,6 +951,14 @@ where /// Compatibility for `failure::Error` impl ResponseError for fail_ure::Error {} +#[cfg(feature = "actix")] +/// `InternalServerError` for `actix::MailboxError` +impl ResponseError for actix::MailboxError {} + +#[cfg(all(feature = "actix", feature = "resolver"))] +/// `InternalServerError` for `actix::ResolverError` +impl ResponseError for actix::actors::resolver::ResolverError {} + #[cfg(test)] mod tests { use super::*;