1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-08-01 07:51:52 +02:00

use new new service api

This commit is contained in:
Nikolay Kim
2019-02-22 14:21:35 -08:00
parent 2f89b12f4f
commit b80ee71785
7 changed files with 30 additions and 18 deletions

View File

@@ -67,9 +67,9 @@ where
type Service = H1ServiceHandler<T, S::Service, B>;
type Future = H1ServiceResponse<T, S, B>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
H1ServiceResponse {
fut: self.srv.new_service(),
fut: self.srv.new_service(&()),
cfg: Some(self.cfg.clone()),
_t: PhantomData,
}
@@ -309,7 +309,7 @@ where
type Service = OneRequestService<T>;
type Future = FutureResult<Self::Service, Self::InitError>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
ok(OneRequestService {
config: self.config.clone(),
_t: PhantomData,

View File

@@ -70,9 +70,9 @@ where
type Service = H2ServiceHandler<T, S::Service, B>;
type Future = H2ServiceResponse<T, S, B>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
H2ServiceResponse {
fut: self.srv.new_service(),
fut: self.srv.new_service(&()),
cfg: Some(self.cfg.clone()),
_t: PhantomData,
}

View File

@@ -34,7 +34,7 @@ where
type Service = SendError<T, R, E>;
type Future = FutureResult<Self::Service, Self::InitError>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
ok(SendError(PhantomData))
}
}
@@ -142,7 +142,7 @@ where
type Service = SendResponse<T, B>;
type Future = FutureResult<Self::Service, Self::InitError>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
ok(SendResponse(PhantomData))
}
}

View File

@@ -28,7 +28,7 @@ impl<T> NewService for VerifyWebSockets<T> {
type Service = VerifyWebSockets<T>;
type Future = FutureResult<Self::Service, Self::InitError>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
ok(VerifyWebSockets { _t: PhantomData })
}
}