1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 16:55:08 +02:00

re-export ready boilerplate macros in dev

This commit is contained in:
Rob Ede
2021-04-16 23:21:02 +01:00
parent 2449f2555c
commit 879a4cbcd8
3 changed files with 16 additions and 16 deletions

View File

@ -145,7 +145,7 @@ pub mod dev {
pub use actix_http::{Extensions, Payload, PayloadStream, RequestHead, ResponseHead};
pub use actix_router::{Path, ResourceDef, ResourcePath, Url};
pub use actix_server::Server;
pub use actix_service::{Service, Transform};
pub use actix_service::{always_ready, forward_ready, Service, Transform};
pub(crate) fn insert_slash(mut patterns: Vec<String>) -> Vec<String> {
for path in &mut patterns {

View File

@ -80,9 +80,7 @@ where
type Error = Error;
type Future = CompatMiddlewareFuture<S::Future>;
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.service.poll_ready(cx).map_err(From::from)
}
actix_service::forward_ready!(service);
fn call(&self, req: Req) -> Self::Future {
let fut = self.service.call(req);