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

update to aw beta 9

This commit is contained in:
Rob Ede 2021-11-22 23:11:58 +00:00
parent 07deaadd7b
commit 13f8dcb717
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
7 changed files with 13 additions and 20 deletions

View File

@ -1,9 +1,8 @@
[alias] [alias]
chk = "check --workspace --all-features --tests --examples --bins" chk = "check --workspace --all-features --tests --examples --bins"
lint = "clippy --workspace --tests --examples" lint = "clippy --workspace --tests --examples --bins -- -Dclippy::todo"
ci-min = "hack check --workspace --no-default-features" ci-min = "hack check --workspace --no-default-features"
ci-min-test = "hack check --workspace --no-default-features --tests --examples" ci-check-min-tests = "hack check --workspace --no-default-features --tests --examples"
ci-default = "check --workspace --bins --tests --examples" ci-check = "check --workspace --bins --tests --examples"
ci-full = "check --workspace --all-features --bins --tests --examples" ci-test = "test --workspace --all-features --lib --tests --examples --bins --no-fail-fast"
ci-test = "test --workspace --all-features --lib --tests --no-fail-fast"
ci-doctest = "hack test --workspace --all-features --doc --no-fail-fast" ci-doctest = "hack test --workspace --all-features --doc --no-fail-fast"

View File

@ -57,15 +57,11 @@ jobs:
- name: check minimal + tests - name: check minimal + tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: { command: ci-min-test } with: { command: ci-check-min-tests }
- name: check default - name: check default
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: { command: ci-default } with: { command: ci-check }
- name: check full
uses: actions-rs/cargo@v1
with: { command: ci-full }
- name: tests - name: tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1

View File

@ -180,7 +180,7 @@ where
res res
} }
} }
.map_ok(|res| res.map_body(|_, body| AnyBody::from_message(body))) .map_ok(|res| res.map_body(|_, body| AnyBody::new_boxed(body)))
.boxed_local(); .boxed_local();
Either::Right(res) Either::Right(res)

View File

@ -129,7 +129,7 @@ mod tests {
f: F, f: F,
) -> impl actix_service::Service< ) -> impl actix_service::Service<
actix_http::Request, actix_http::Request,
Response = ServiceResponse<actix_web::body::Body>, Response = ServiceResponse<actix_web::body::AnyBody>,
Error = Error, Error = Error,
> { > {
test::init_service( test::init_service(

View File

@ -103,17 +103,17 @@ where
if let Some(id) = id { if let Some(id) = id {
match backend.to_response(id.id, id.changed, &mut res).await { match backend.to_response(id.id, id.changed, &mut res).await {
Ok(_) => Ok(res.map_body(|_, body| AnyBody::from_message(body))), Ok(_) => Ok(res.map_body(|_, body| AnyBody::new_boxed(body))),
Err(e) => Ok(res.error_response(e)), Err(e) => Ok(res.error_response(e)),
} }
} else { } else {
Ok(res.map_body(|_, body| AnyBody::from_message(body))) Ok(res.map_body(|_, body| AnyBody::new_boxed(body)))
} }
} }
Err(err) => Ok(req.error_response(err)), Err(err) => Ok(req.error_response(err)),
} }
} }
.map_ok(|res| res.map_body(|_, body| AnyBody::from_message(body))) .map_ok(|res| res.map_body(|_, body| AnyBody::new_boxed(body)))
.boxed_local() .boxed_local()
} }
} }

View File

@ -378,7 +378,7 @@ where
}; };
match result { match result {
Ok(()) => Ok(res.map_body(|_, body| AnyBody::from_message(body))), Ok(()) => Ok(res.map_body(|_, body| AnyBody::new_boxed(body))),
Err(error) => Ok(res.error_response(error)), Err(error) => Ok(res.error_response(error)),
} }
} }

View File

@ -57,7 +57,6 @@ where
/// Construct `HttpAuthentication` middleware for the HTTP "Basic" authentication scheme. /// Construct `HttpAuthentication` middleware for the HTTP "Basic" authentication scheme.
/// ///
/// # Example /// # Example
///
/// ``` /// ```
/// # use actix_web::Error; /// # use actix_web::Error;
/// # use actix_web::dev::ServiceRequest; /// # use actix_web::dev::ServiceRequest;
@ -89,7 +88,6 @@ where
/// Construct `HttpAuthentication` middleware for the HTTP "Bearer" authentication scheme. /// Construct `HttpAuthentication` middleware for the HTTP "Bearer" authentication scheme.
/// ///
/// # Example /// # Example
///
/// ``` /// ```
/// # use actix_web::Error; /// # use actix_web::Error;
/// # use actix_web::dev::ServiceRequest; /// # use actix_web::dev::ServiceRequest;
@ -187,7 +185,7 @@ where
service service
.call(req) .call(req)
.await .await
.map(|res| res.map_body(|_, body| AnyBody::from_message(body))) .map(|res| res.map_body(|_, body| AnyBody::new_boxed(body)))
} }
.boxed_local() .boxed_local()
} }