chore(server): stop using deprecated method internally
This commit is contained in:
		| @@ -470,6 +470,27 @@ impl<E> Http<E> { | ||||
|             protocol: self.clone(), | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     pub(super) fn serve<I, IO, IE, S, Bd>(&self, incoming: I, make_service: S) -> Serve<I, S, E> | ||||
|     where | ||||
|         I: Accept<Conn=IO, Error=IE>, | ||||
|         IE: Into<Box<dyn StdError + Send + Sync>>, | ||||
|         IO: AsyncRead + AsyncWrite + Unpin, | ||||
|         S: MakeServiceRef< | ||||
|             IO, | ||||
|             Body, | ||||
|             ResBody=Bd, | ||||
|         >, | ||||
|         S::Error: Into<Box<dyn StdError + Send + Sync>>, | ||||
|         Bd: Payload, | ||||
|         E: H2Exec<<S::Service as Service<Body>>::Future, Bd>, | ||||
|     { | ||||
|         Serve { | ||||
|             incoming, | ||||
|             make_service, | ||||
|             protocol: self.clone(), | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -394,7 +394,7 @@ impl<I, E> Builder<I, E> { | ||||
|         E: NewSvcExec<I::Conn, S::Future, S::Service, E, NoopWatcher>, | ||||
|         E: H2Exec<<S::Service as Service<Body>>::Future, B>, | ||||
|     { | ||||
|         let serve = self.protocol.serve_incoming(self.incoming, new_service); | ||||
|         let serve = self.protocol.serve(self.incoming, new_service); | ||||
|         let spawn_all = serve.spawn_all(); | ||||
|         Server { | ||||
|             spawn_all, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user