1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00

relax body bounds (#223)

This commit is contained in:
Rob Ede 2022-02-07 02:30:26 +00:00 committed by GitHub
parent 7bb1f8d710
commit ab3615b8d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 8 deletions

View File

@ -1,8 +1,11 @@
# Changes # Changes
## Unreleased - 2021-xx-xx ## Unreleased - 2021-xx-xx
- Relax body type bounds on middleware impl. [#223]
- Update `actix-web` dependency to `4.0.0-rc.1`. - Update `actix-web` dependency to `4.0.0-rc.1`.
[#223]: https://github.com/actix/actix-extras/pull/223
## 0.6.0-beta.8 - 2021-12-29 ## 0.6.0-beta.8 - 2021-12-29
- Minimum supported Rust version (MSRV) is now 1.54. - Minimum supported Rust version (MSRV) is now 1.54.

View File

@ -490,7 +490,6 @@ where
S::Future: 'static, S::Future: 'static,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = Error; type Error = Error;

View File

@ -143,7 +143,6 @@ where
S::Future: 'static, S::Future: 'static,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = Error; type Error = Error;
@ -189,12 +188,19 @@ where
mod tests { mod tests {
use actix_web::{ use actix_web::{
dev::Transform, dev::Transform,
middleware::Compat,
test::{self, TestRequest}, test::{self, TestRequest},
App,
}; };
use super::*; use super::*;
use crate::Cors; use crate::Cors;
#[test]
fn compat_compat() {
let _ = App::new().wrap(Compat::new(Cors::default()));
}
#[actix_web::test] #[actix_web::test]
async fn test_options_no_origin() { async fn test_options_no_origin() {
// Tests case where allowed_origins is All but there are validate functions to run incase. // Tests case where allowed_origins is All but there are validate functions to run incase.

View File

@ -1,8 +1,11 @@
# Changes # Changes
## Unreleased - 2021-xx-xx ## Unreleased - 2021-xx-xx
- Relax body type bounds on middleware impl. [#223]
- Update `actix-web` dependency to `4.0.0-rc.1`. - Update `actix-web` dependency to `4.0.0-rc.1`.
[#223]: https://github.com/actix/actix-extras/pull/223
## 0.4.0-beta.8 - 2022-01-21 ## 0.4.0-beta.8 - 2022-01-21
- No significant changes since `0.4.0-beta.7`. - No significant changes since `0.4.0-beta.7`.

View File

@ -44,7 +44,6 @@ where
S::Future: 'static, S::Future: 'static,
T: IdentityPolicy, T: IdentityPolicy,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = Error; type Error = Error;
@ -80,7 +79,6 @@ where
S::Future: 'static, S::Future: 'static,
T: IdentityPolicy, T: IdentityPolicy,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = Error; type Error = Error;

View File

@ -301,7 +301,6 @@ where
S::Future: 'static, S::Future: 'static,
S::Error: 'static, S::Error: 'static,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = S::Error; type Error = S::Error;
@ -329,7 +328,6 @@ where
S::Future: 'static, S::Future: 'static,
S::Error: 'static, S::Error: 'static,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = S::Error; type Error = S::Error;

View File

@ -1,8 +1,11 @@
# Changes # Changes
## Unreleased - 2021-xx-xx ## Unreleased - 2021-xx-xx
- Relax body type bounds on middleware impl. [#223]
- Update `actix-web` dependency to `4.0.0-rc.1`. - Update `actix-web` dependency to `4.0.0-rc.1`.
[#223]: https://github.com/actix/actix-extras/pull/223
## 0.6.0-beta.7 - 2021-12-29 ## 0.6.0-beta.7 - 2021-12-29
- Minimum supported Rust version (MSRV) is now 1.54. - Minimum supported Rust version (MSRV) is now 1.54.

View File

@ -124,7 +124,6 @@ where
O: Future<Output = Result<ServiceRequest, Error>> + 'static, O: Future<Output = Result<ServiceRequest, Error>> + 'static,
T: AuthExtractor + 'static, T: AuthExtractor + 'static,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = Error; type Error = Error;
@ -159,7 +158,6 @@ where
O: Future<Output = Result<ServiceRequest, Error>> + 'static, O: Future<Output = Result<ServiceRequest, Error>> + 'static,
T: AuthExtractor + 'static, T: AuthExtractor + 'static,
B: MessageBody + 'static, B: MessageBody + 'static,
B::Error: Into<Error>,
{ {
type Response = ServiceResponse<EitherBody<B>>; type Response = ServiceResponse<EitherBody<B>>;
type Error = S::Error; type Error = S::Error;