mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
actix-http: Remove failure
support (#1449)
This commit is contained in:
parent
5b36381cb0
commit
54619cb680
@ -42,7 +42,7 @@ members = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["compress", "failure"]
|
default = ["compress"]
|
||||||
|
|
||||||
# content-encoding support
|
# content-encoding support
|
||||||
compress = ["actix-http/compress", "awc/compress"]
|
compress = ["actix-http/compress", "awc/compress"]
|
||||||
@ -50,8 +50,6 @@ compress = ["actix-http/compress", "awc/compress"]
|
|||||||
# sessions feature, session require "ring" crate and c compiler
|
# sessions feature, session require "ring" crate and c compiler
|
||||||
secure-cookies = ["actix-http/secure-cookies"]
|
secure-cookies = ["actix-http/secure-cookies"]
|
||||||
|
|
||||||
failure = ["actix-http/failure"]
|
|
||||||
|
|
||||||
# openssl
|
# openssl
|
||||||
openssl = ["actix-tls/openssl", "awc/openssl", "open-ssl"]
|
openssl = ["actix-tls/openssl", "awc/openssl", "open-ssl"]
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* Implement `std::error::Error` for our custom errors [#1422]
|
* Implement `std::error::Error` for our custom errors [#1422]
|
||||||
|
* Remove `failure` support for `ResponseError` since that crate
|
||||||
|
will be deprecated in the near future.
|
||||||
|
|
||||||
[#1422]: https://github.com/actix/actix-web/pull/1422
|
[#1422]: https://github.com/actix/actix-web/pull/1422
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ license = "MIT/Apache-2.0"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["openssl", "rustls", "failure", "compress", "secure-cookies","actors"]
|
features = ["openssl", "rustls", "compress", "secure-cookies", "actors"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "actix_http"
|
name = "actix_http"
|
||||||
@ -33,9 +33,6 @@ rustls = ["actix-tls/rustls", "actix-connect/rustls"]
|
|||||||
# enable compressison support
|
# enable compressison support
|
||||||
compress = ["flate2", "brotli2"]
|
compress = ["flate2", "brotli2"]
|
||||||
|
|
||||||
# failure integration. actix does not use failure anymore
|
|
||||||
failure = ["fail-ure"]
|
|
||||||
|
|
||||||
# support for secure cookies
|
# support for secure cookies
|
||||||
secure-cookies = ["ring"]
|
secure-cookies = ["ring"]
|
||||||
|
|
||||||
@ -89,9 +86,6 @@ ring = { version = "0.16.9", optional = true }
|
|||||||
brotli2 = { version="0.3.2", optional = true }
|
brotli2 = { version="0.3.2", optional = true }
|
||||||
flate2 = { version = "1.0.13", optional = true }
|
flate2 = { version = "1.0.13", optional = true }
|
||||||
|
|
||||||
# optional deps
|
|
||||||
fail-ure = { version = "0.1.5", package="failure", optional = true }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-server = "1.0.1"
|
actix-server = "1.0.1"
|
||||||
actix-connect = { version = "2.0.0-alpha.2", features=["openssl"] }
|
actix-connect = { version = "2.0.0-alpha.2", features=["openssl"] }
|
||||||
|
@ -34,7 +34,7 @@ pub type Result<T, E = Error> = result::Result<T, E>;
|
|||||||
|
|
||||||
/// General purpose actix web error.
|
/// General purpose actix web error.
|
||||||
///
|
///
|
||||||
/// An actix web error is used to carry errors from `failure` or `std::error`
|
/// An actix web error is used to carry errors from `std::error`
|
||||||
/// through actix in a convenient way. It can be created through
|
/// through actix in a convenient way. It can be created through
|
||||||
/// converting errors with `into()`.
|
/// converting errors with `into()`.
|
||||||
///
|
///
|
||||||
@ -950,10 +950,6 @@ where
|
|||||||
InternalError::new(err, StatusCode::NETWORK_AUTHENTICATION_REQUIRED).into()
|
InternalError::new(err, StatusCode::NETWORK_AUTHENTICATION_REQUIRED).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "failure")]
|
|
||||||
/// Compatibility for `failure::Error`
|
|
||||||
impl ResponseError for fail_ure::Error {}
|
|
||||||
|
|
||||||
#[cfg(feature = "actors")]
|
#[cfg(feature = "actors")]
|
||||||
/// `InternalServerError` for `actix::MailboxError`
|
/// `InternalServerError` for `actix::MailboxError`
|
||||||
/// This is supported on feature=`actors` only
|
/// This is supported on feature=`actors` only
|
||||||
|
Loading…
Reference in New Issue
Block a user