mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 09:12:57 +01:00
update to aw beta 9
This commit is contained in:
parent
07deaadd7b
commit
13f8dcb717
@ -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"
|
||||
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
@ -129,7 +129,7 @@ mod tests {
|
||||
f: F,
|
||||
) -> impl actix_service::Service<
|
||||
actix_http::Request,
|
||||
Response = ServiceResponse<actix_web::body::Body>,
|
||||
Response = ServiceResponse<actix_web::body::AnyBody>,
|
||||
Error = Error,
|
||||
> {
|
||||
test::init_service(
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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)),
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user