@@ -9,9 +9,8 @@ use crate::{
99 client:: {
1010 self ,
1111 async_io:: { RequestWriter , SetServiceResponse } ,
12- capabilities,
12+ capabilities:: async_recv :: Outcome ,
1313 git:: { self , ConnectionState } ,
14- Capabilities ,
1514 } ,
1615 packetline:: {
1716 async_io:: { StreamingPeekableIter , Writer } ,
@@ -97,11 +96,11 @@ where
9796 line_writer. flush ( ) . await ?;
9897 }
9998
100- let capabilities :: recv :: Outcome {
99+ let Outcome {
101100 capabilities,
102101 refs,
103102 protocol : actual_protocol,
104- } = Capabilities :: from_lines_with_version_detection ( & mut self . line_provider ) . await ?;
103+ } = Outcome :: from_lines_with_version_detection ( & mut self . line_provider ) . await ?;
105104 Ok ( SetServiceResponse {
106105 actual_protocol,
107106 capabilities,
@@ -164,9 +163,12 @@ mod async_net {
164163
165164 use async_std:: net:: TcpStream ;
166165
167- use crate :: client:: { git, Error } ;
166+ use crate :: client:: {
167+ git:: { async_io:: Connection , ConnectMode } ,
168+ Error ,
169+ } ;
168170
169- impl git :: Connection < TcpStream , TcpStream > {
171+ impl Connection < TcpStream , TcpStream > {
170172 /// Create a new TCP connection using the `git` protocol of `desired_version`, and make a connection to `host`
171173 /// at `port` for accessing the repository at `path` on the server side.
172174 /// If `trace` is `true`, all packetlines received or sent will be passed to the facilities of the `gix-trace` crate.
@@ -176,20 +178,20 @@ mod async_net {
176178 path : bstr:: BString ,
177179 desired_version : crate :: Protocol ,
178180 trace : bool ,
179- ) -> Result < git :: Connection < TcpStream , TcpStream > , Error > {
181+ ) -> Result < Self , Error > {
180182 let read = async_std:: io:: timeout (
181183 Duration :: from_secs ( 5 ) ,
182184 TcpStream :: connect ( & ( host, port. unwrap_or ( 9418 ) ) ) ,
183185 )
184186 . await ?;
185187 let write = read. clone ( ) ;
186- Ok ( git :: Connection :: new (
188+ Ok ( Self :: new (
187189 read,
188190 write,
189191 desired_version,
190192 path,
191193 None :: < ( String , _ ) > ,
192- git :: ConnectMode :: Daemon ,
194+ ConnectMode :: Daemon ,
193195 trace,
194196 ) )
195197 }
0 commit comments