diff --git a/.cargo/config.toml b/.cargo/config.toml index 95d56f15f..8749b7316 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,9 +1,8 @@ [alias] 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-test = "hack check --workspace --no-default-features --tests --examples" -ci-default = "check --workspace --bins --tests --examples" -ci-full = "check --workspace --all-features --bins --tests --examples" -ci-test = "test --workspace --all-features --lib --tests --no-fail-fast" +ci-check-min-tests = "hack check --workspace --no-default-features --tests --examples" +ci-check = "check --workspace --bins --tests --examples" +ci-test = "test --workspace --all-features --lib --tests --examples --bins --no-fail-fast" ci-doctest = "hack test --workspace --all-features --doc --no-fail-fast" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 096d9839d..26aff4b0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,15 +57,11 @@ jobs: - name: check minimal + tests uses: actions-rs/cargo@v1 - with: { command: ci-min-test } + with: { command: ci-check-min-tests } - name: check default uses: actions-rs/cargo@v1 - with: { command: ci-default } - - - name: check full - uses: actions-rs/cargo@v1 - with: { command: ci-full } + with: { command: ci-check } - name: tests uses: actions-rs/cargo@v1 diff --git a/actix-cors/src/middleware.rs b/actix-cors/src/middleware.rs index 21cda8441..acb53b088 100644 --- a/actix-cors/src/middleware.rs +++ b/actix-cors/src/middleware.rs @@ -180,7 +180,7 @@ where 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(); Either::Right(res) diff --git a/actix-identity/src/lib.rs b/actix-identity/src/lib.rs index 434e7d0d0..98466cae6 100644 --- a/actix-identity/src/lib.rs +++ b/actix-identity/src/lib.rs @@ -129,7 +129,7 @@ mod tests { f: F, ) -> impl actix_service::Service< actix_http::Request, - Response = ServiceResponse, + Response = ServiceResponse, Error = Error, > { test::init_service( diff --git a/actix-identity/src/middleware.rs b/actix-identity/src/middleware.rs index 9172276f4..6886409e6 100644 --- a/actix-identity/src/middleware.rs +++ b/actix-identity/src/middleware.rs @@ -103,17 +103,17 @@ where if let Some(id) = id { 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)), } } 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)), } } - .map_ok(|res| res.map_body(|_, body| AnyBody::from_message(body))) + .map_ok(|res| res.map_body(|_, body| AnyBody::new_boxed(body))) .boxed_local() } } diff --git a/actix-session/src/cookie.rs b/actix-session/src/cookie.rs index 3a39bc423..bda4e54d6 100644 --- a/actix-session/src/cookie.rs +++ b/actix-session/src/cookie.rs @@ -378,7 +378,7 @@ where }; 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)), } } diff --git a/actix-web-httpauth/src/middleware.rs b/actix-web-httpauth/src/middleware.rs index 828d3401d..3072fd846 100644 --- a/actix-web-httpauth/src/middleware.rs +++ b/actix-web-httpauth/src/middleware.rs @@ -57,7 +57,6 @@ where /// Construct `HttpAuthentication` middleware for the HTTP "Basic" authentication scheme. /// /// # Example - /// /// ``` /// # use actix_web::Error; /// # use actix_web::dev::ServiceRequest; @@ -89,7 +88,6 @@ where /// Construct `HttpAuthentication` middleware for the HTTP "Bearer" authentication scheme. /// /// # Example - /// /// ``` /// # use actix_web::Error; /// # use actix_web::dev::ServiceRequest; @@ -187,7 +185,7 @@ where service .call(req) .await - .map(|res| res.map_body(|_, body| AnyBody::from_message(body))) + .map(|res| res.map_body(|_, body| AnyBody::new_boxed(body))) } .boxed_local() }