4343//! dyn Future<Output = Result<Self::Response, Self::Error>> + Send
4444//! >>;
4545//!
46- //! fn poll_ready(&mut self, _: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
47- //! // This connector is always ready, but others might not be.
48- //! Poll::Ready(Ok(()))
49- //! }
50- //!
5146//! fn call(&mut self, _: Uri) -> Self::Future {
5247//! Box::pin(TcpStream::connect(SocketAddr::from(([127, 0, 0, 1], 1337))))
5348//! }
@@ -276,6 +271,7 @@ pub(super) mod sealed {
276271
277272 use super :: Connection ;
278273 use crate :: common:: { Future , Unpin } ;
274+ use crate :: service:: Service ;
279275
280276 /// Connect to a destination, returning an IO transport.
281277 ///
@@ -306,28 +302,28 @@ pub(super) mod sealed {
306302
307303 impl < S , T > Connect for S
308304 where
309- S : tower_service :: Service < Uri , Response = T > + Send + ' static ,
305+ S : Service < Uri , Response = T > + Send + ' static ,
310306 S :: Error : Into < Box < dyn StdError + Send + Sync > > ,
311307 S :: Future : Unpin + Send ,
312308 T : AsyncRead + AsyncWrite + Connection + Unpin + Send + ' static ,
313309 {
314310 type _Svc = S ;
315311
316- fn connect ( self , _: Internal , dst : Uri ) -> crate :: service:: Oneshot < S , Uri > {
312+ fn connect ( self , _: Internal , dst : Uri ) -> crate :: service:: Oneshot < S :: Future > {
317313 crate :: service:: oneshot ( self , dst)
318314 }
319315 }
320316
321317 impl < S , T > ConnectSvc for S
322318 where
323- S : tower_service :: Service < Uri , Response = T > + Send + ' static ,
319+ S : Service < Uri , Response = T > + Send + ' static ,
324320 S :: Error : Into < Box < dyn StdError + Send + Sync > > ,
325321 S :: Future : Unpin + Send ,
326322 T : AsyncRead + AsyncWrite + Connection + Unpin + Send + ' static ,
327323 {
328324 type Connection = T ;
329325 type Error = S :: Error ;
330- type Future = crate :: service:: Oneshot < S , Uri > ;
326+ type Future = crate :: service:: Oneshot < S :: Future > ;
331327
332328 fn connect ( self , _: Internal , dst : Uri ) -> Self :: Future {
333329 crate :: service:: oneshot ( self , dst)
@@ -336,7 +332,7 @@ pub(super) mod sealed {
336332
337333 impl < S , T > Sealed for S
338334 where
339- S : tower_service :: Service < Uri , Response = T > + Send ,
335+ S : Service < Uri , Response = T > + Send ,
340336 S :: Error : Into < Box < dyn StdError + Send + Sync > > ,
341337 S :: Future : Unpin + Send ,
342338 T : AsyncRead + AsyncWrite + Connection + Unpin + Send + ' static ,
0 commit comments