1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-26 16:17:43 +02:00

service improvements (#233)

This commit is contained in:
Rob Ede
2020-12-27 14:15:42 +00:00
committed by GitHub
parent 33c9aa6988
commit 8a58a341a4
27 changed files with 387 additions and 1179 deletions

View File

@ -4,8 +4,7 @@
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
use std::marker::PhantomData;
use std::task::{Context, Poll};
use core::marker::PhantomData;
use actix_service::{
apply, dev::ApplyTransform, IntoServiceFactory, Service, ServiceFactory, Transform,
@ -36,9 +35,7 @@ where
type Error = S::Error;
type Future = Either<S::Future, Instrumented<S::Future>>;
fn poll_ready(&mut self, ctx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.inner.poll_ready(ctx)
}
actix_service::forward_ready!(inner);
fn call(&mut self, req: Req) -> Self::Future {
let span = (self.make_span)(&req);