@@ -33,8 +33,8 @@ pub struct PoolSettings {
3333pub struct Client < C , T , B > {
3434 connect : C ,
3535 target : T ,
36- absolute_form : Option < hyper :: Client < HyperConnect < C , T > , B > > ,
37- origin_form : Option < hyper :: Client < HyperConnect < C , T > , B > > ,
36+ absolute_form : Option < hyper_util :: client :: legacy :: Client < HyperConnect < C , T > , B > > ,
37+ origin_form : Option < hyper_util :: client :: legacy :: Client < HyperConnect < C , T > , B > > ,
3838 pool : PoolSettings ,
3939}
4040
@@ -68,9 +68,9 @@ impl<C, T, B> Client<C, T, B>
6868where
6969 T : Clone + Send + Sync + ' static ,
7070 C : MakeConnection < ( crate :: Variant , T ) > + Clone + Send + Sync + ' static ,
71- C :: Connection : Unpin + Send ,
71+ C :: Connection : Unpin + Send + hyper :: rt :: Read + hyper :: rt :: Write ,
7272 C :: Future : Unpin + Send + ' static ,
73- B : crate :: Body + Send + ' static ,
73+ B : crate :: Body + Send + Unpin + ' static ,
7474 B :: Data : Send ,
7575 B :: Error : Into < Error > + Send + Sync ,
7676{
9494 // ish, so we just build a one-off client for the connection.
9595 // There's no real reason to hold the client for re-use.
9696 debug ! ( use_absolute_form, is_missing_host, "Using one-off client" ) ;
97- hyper :: Client :: builder ( )
97+ hyper_util :: client :: legacy :: Client :: builder ( TracingExecutor )
9898 . pool_max_idle_per_host ( 0 )
9999 . set_host ( use_absolute_form)
100- . executor ( TracingExecutor )
101100 . build ( HyperConnect :: new (
102101 self . connect . clone ( ) ,
103102 self . target . clone ( ) ,
@@ -120,11 +119,10 @@ where
120119 if client. is_none ( ) {
121120 debug ! ( use_absolute_form, "Caching new client" ) ;
122121 * client = Some (
123- hyper :: Client :: builder ( )
122+ hyper_util :: client :: legacy :: Client :: builder ( TracingExecutor )
124123 . pool_max_idle_per_host ( self . pool . max_idle )
125124 . pool_idle_timeout ( self . pool . idle_timeout )
126125 . set_host ( use_absolute_form)
127- . executor ( TracingExecutor )
128126 . build ( HyperConnect :: new (
129127 self . connect . clone ( ) ,
130128 self . target . clone ( ) ,
0 commit comments