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:
@@ -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,
|
||||
|
@@ -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,
|
||||
}
|
||||
|
@@ -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))
|
||||
}
|
||||
}
|
||||
|
@@ -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 })
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user