@@ -110,14 +110,14 @@ where
110110 let io = IoBoxed :: from ( io) ;
111111
112112 if let Some ( auth) = sasl {
113- _connect_sasl ( io, auth, self . config , hostname) . await
113+ connect_sasl_inner ( io, auth, self . config . clone ( ) , hostname) . await
114114 } else {
115- _connect_plain ( io, self . config , hostname) . await
115+ connect_plain_inner ( io, self . config . clone ( ) , hostname) . await
116116 }
117117 } ;
118118 timeout_checked ( self . config . handshake_timeout , fut)
119119 . await
120- . map_err ( |_ | ConnectError :: HandshakeTimeout )
120+ . map_err ( |( ) | ConnectError :: HandshakeTimeout )
121121 . and_then ( |res| res)
122122 }
123123}
@@ -136,7 +136,7 @@ where
136136 ) -> Result < Client , ConnectError > {
137137 log:: trace!( "{}: Negotiation client protocol id: Amqp" , io. tag( ) ) ;
138138
139- _connect_plain ( io, self . config , hostname) . await
139+ connect_plain_inner ( io, self . config . clone ( ) , hostname) . await
140140 }
141141
142142 /// Negotiate amqp sasl protocol over opened socket
@@ -148,11 +148,11 @@ where
148148 ) -> Result < Client , ConnectError > {
149149 log:: trace!( "{}: Negotiation client protocol id: Amqp" , io. tag( ) ) ;
150150
151- _connect_sasl ( io, auth, self . config , hostname) . await
151+ connect_sasl_inner ( io, auth, self . config . clone ( ) , hostname) . await
152152 }
153153}
154154
155- async fn _connect_sasl (
155+ async fn connect_sasl_inner (
156156 io : IoBoxed ,
157157 auth : SaslAuth ,
158158 config : Cfg < AmqpServiceConfig > ,
@@ -204,10 +204,10 @@ async fn _connect_sasl(
204204 return Err ( ConnectError :: Disconnected ) ;
205205 }
206206
207- _connect_plain ( io, config, hostname) . await
207+ connect_plain_inner ( io, config, hostname) . await
208208}
209209
210- async fn _connect_plain (
210+ async fn connect_plain_inner (
211211 io : IoBoxed ,
212212 config : Cfg < AmqpServiceConfig > ,
213213 hostname : Option < ByteString > ,
@@ -250,7 +250,7 @@ async fn _connect_plain(
250250 if let Frame :: Open ( open) = frame. performative ( ) {
251251 log:: trace!( "{}: Open confirmed: {:?}" , io. tag( ) , open) ;
252252 let remote_config = config. from_remote ( open) ;
253- let connection = Connection :: new ( io. get_ref ( ) , & config, & remote_config) ;
253+ let connection = Connection :: new ( io. get_ref ( ) , config, & remote_config) ;
254254 let client = Client :: new ( io, codec, connection, remote_config) ;
255255 Ok ( client)
256256 } else {
0 commit comments