@@ -215,13 +215,6 @@ impl Default for Options {
215215    } 
216216} 
217217
218- /// The actual http client implementation, using curl 
219- #[ cfg( feature = "http-client-curl" ) ]  
220- pub  type  Impl  = curl:: Curl ; 
221- /// The actual http client implementation, using reqwest 
222- #[ cfg( feature = "http-client-reqwest" ) ]  
223- pub  type  Impl  = reqwest:: Remote ; 
224- 
225218/// A transport for supporting arbitrary http clients by abstracting interactions with them into the [Http] trait. 
226219pub  struct  Transport < H :  Http >  { 
227220    url :  String , 
@@ -270,13 +263,13 @@ impl<H: Http> Transport<H> {
270263} 
271264
272265#[ cfg( any( feature = "http-client-curl" ,  feature = "http-client-reqwest" ) ) ]  
273- impl   Transport < Impl >  { 
266+ impl < H :   Http  +  Default >   Transport < H >  { 
274267    /// Create a new instance to communicate to `url` using the given `desired_version` of the `git` protocol. 
275268/// If `trace` is `true`, all packetlines received or sent will be passed to the facilities of the `gix-trace` crate. 
276269/// 
277270/// Note that the actual implementation depends on feature toggles. 
278271pub  fn  new ( url :  gix_url:: Url ,  desired_version :  Protocol ,  trace :  bool )  -> Self  { 
279-         Self :: new_http ( Impl :: default ( ) ,  url,  desired_version,  trace) 
272+         Self :: new_http ( H :: default ( ) ,  url,  desired_version,  trace) 
280273    } 
281274} 
282275
@@ -555,7 +548,7 @@ pub fn connect_http<H: Http>(http: H, url: gix_url::Url, desired_version: Protoc
555548/// Connect to the given `url` via HTTP/S using the `desired_version` of the `git` protocol. 
556549/// If `trace` is `true`, all packetlines received or sent will be passed to the facilities of the `gix-trace` crate. 
557550#[ cfg( any( feature = "http-client-curl" ,  feature = "http-client-reqwest" ) ) ]  
558- pub  fn  connect ( url :  gix_url:: Url ,  desired_version :  Protocol ,  trace :  bool )  -> Transport < Impl >  { 
551+ pub  fn  connect < H :   Http  +  Default > ( url :  gix_url:: Url ,  desired_version :  Protocol ,  trace :  bool )  -> Transport < H >  { 
559552    Transport :: new ( url,  desired_version,  trace) 
560553} 
561554
0 commit comments