mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-30 16:40:21 +02:00
migrate to new Service<Request> trait
This commit is contained in:
@@ -38,8 +38,7 @@ impl<T> Clone for RustlsAcceptor<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> NewService for RustlsAcceptor<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> NewService<T> for RustlsAcceptor<T> {
|
||||
type Response = TlsStream<T, ServerSession>;
|
||||
type Error = io::Error;
|
||||
type Service = RustlsAcceptorService<T>;
|
||||
@@ -63,8 +62,7 @@ pub struct RustlsAcceptorService<T> {
|
||||
conns: Counter,
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> Service for RustlsAcceptorService<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> Service<T> for RustlsAcceptorService<T> {
|
||||
type Response = TlsStream<T, ServerSession>;
|
||||
type Error = io::Error;
|
||||
type Future = RustlsAcceptorServiceFut<T>;
|
||||
@@ -77,7 +75,7 @@ impl<T: AsyncRead + AsyncWrite> Service for RustlsAcceptorService<T> {
|
||||
}
|
||||
}
|
||||
|
||||
fn call(&mut self, req: Self::Request) -> Self::Future {
|
||||
fn call(&mut self, req: T) -> Self::Future {
|
||||
RustlsAcceptorServiceFut {
|
||||
_guard: self.conns.get(),
|
||||
fut: self.acceptor.accept(req),
|
||||
|
Reference in New Issue
Block a user