File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -36,4 +36,20 @@ mod impls {
3636}
3737
3838#[ cfg( any( feature = "async-client" , feature = "blocking-client" ) ) ]
39- pub use gix:: protocol:: transport:: connect;
39+ #[ gix:: protocol:: maybe_async:: maybe_async]
40+ pub async fn connect < Url , E > (
41+ url : Url ,
42+ options : gix:: protocol:: transport:: client:: connect:: Options ,
43+ ) -> Result <
44+ gix:: protocol:: SendFlushOnDrop < Box < dyn gix:: protocol:: transport:: client:: Transport + Send > > ,
45+ gix:: protocol:: transport:: client:: connect:: Error ,
46+ >
47+ where
48+ Url : TryInto < gix:: url:: Url , Error = E > ,
49+ gix:: url:: parse:: Error : From < E > ,
50+ {
51+ Ok ( gix:: protocol:: SendFlushOnDrop :: new (
52+ gix:: protocol:: transport:: connect ( url, options) . await ?,
53+ false ,
54+ ) )
55+ }
Original file line number Diff line number Diff line change 6464
6565 let agent = gix:: protocol:: agent ( gix:: env:: agent ( ) ) ;
6666 let mut handshake = gix:: protocol:: fetch:: handshake (
67- & mut transport,
67+ & mut transport. inner ,
6868 gix:: protocol:: credentials:: builtin,
6969 vec ! [ ( "agent" . into( ) , Some ( agent. clone( ) ) ) ] ,
7070 & mut progress,
8585 & fetch_refspecs,
8686 gix:: protocol:: fetch:: Context {
8787 handshake : & mut handshake,
88- transport : & mut transport,
88+ transport : & mut transport. inner ,
8989 user_agent : user_agent. clone ( ) ,
9090 trace_packetlines,
9191 } ,
@@ -114,7 +114,7 @@ where
114114 & ctx. should_interrupt ,
115115 gix:: protocol:: fetch:: Context {
116116 handshake : & mut handshake,
117- transport : & mut transport,
117+ transport : & mut transport. inner ,
118118 user_agent,
119119 trace_packetlines,
120120 } ,
You can’t perform that action at this time.
0 commit comments