@@ -69,8 +69,8 @@ use crate::session::{CommonSession, EncryptedState, GlobalRequestResponse, NewKe
6969use crate :: ssh_read:: SshRead ;
7070use crate :: sshbuffer:: { IncomingSshPacket , PacketWriter , SSHBuffer , SshId } ;
7171use crate :: {
72- ChannelId , ChannelOpenFailure , Disconnect , Error , Limits , MethodSet , Sig , auth,
73- map_err , msg , negotiation,
72+ ChannelId , ChannelOpenFailure , Disconnect , Error , Limits , MethodSet , Sig , auth, map_err , msg ,
73+ negotiation,
7474} ;
7575
7676mod encrypted;
@@ -1539,7 +1539,8 @@ impl Session {
15391539 } ) ;
15401540 enc. channels
15411541 . insert ( pending. sender_channel , pending. channel_params ) ;
1542- self . channels . insert ( pending. sender_channel , pending. channel_ref ) ;
1542+ self . channels
1543+ . insert ( pending. sender_channel , pending. channel_ref ) ;
15431544 }
15441545 Err ( reason) => {
15451546 push_packet ! ( enc. write, {
@@ -1738,10 +1739,7 @@ mod tests {
17381739 impl Handler for TestHandler {
17391740 type Error = crate :: Error ;
17401741
1741- async fn check_server_key (
1742- & mut self ,
1743- _: & ssh_key:: PublicKey ,
1744- ) -> Result < bool , Self :: Error > {
1742+ async fn check_server_key ( & mut self , _: & ssh_key:: PublicKey ) -> Result < bool , Self :: Error > {
17451743 Ok ( true )
17461744 }
17471745 }
@@ -2257,6 +2255,7 @@ pub trait Handler: Sized + Send {
22572255 /// [`reply.reject(reason).await`](ChannelOpenHandle::reject) to decline.
22582256 /// Dropping `reply` automatically rejects.
22592257 #[ allow( unused_variables) ]
2258+ #[ allow( clippy:: too_many_arguments) ]
22602259 fn server_channel_open_forwarded_tcpip (
22612260 & mut self ,
22622261 channel : Channel < Msg > ,
@@ -2267,7 +2266,10 @@ pub trait Handler: Sized + Send {
22672266 reply : ChannelOpenHandle ,
22682267 session : & mut Session ,
22692268 ) -> impl Future < Output = Result < ( ) , Self :: Error > > + Send {
2270- async move { reply. accept ( ) . await ; Ok ( ( ) ) }
2269+ async move {
2270+ reply. accept ( ) . await ;
2271+ Ok ( ( ) )
2272+ }
22712273 }
22722274
22732275 /// Called when the server opens a channel for a new remote UDS forwarding connection.
@@ -2283,7 +2285,10 @@ pub trait Handler: Sized + Send {
22832285 reply : ChannelOpenHandle ,
22842286 session : & mut Session ,
22852287 ) -> impl Future < Output = Result < ( ) , Self :: Error > > + Send {
2286- async move { reply. accept ( ) . await ; Ok ( ( ) ) }
2288+ async move {
2289+ reply. accept ( ) . await ;
2290+ Ok ( ( ) )
2291+ }
22872292 }
22882293
22892294 /// Called when the server opens an agent forwarding channel.
@@ -2298,7 +2303,10 @@ pub trait Handler: Sized + Send {
22982303 reply : ChannelOpenHandle ,
22992304 session : & mut Session ,
23002305 ) -> impl Future < Output = Result < ( ) , Self :: Error > > + Send {
2301- async move { reply. accept ( ) . await ; Ok ( ( ) ) }
2306+ async move {
2307+ reply. accept ( ) . await ;
2308+ Ok ( ( ) )
2309+ }
23022310 }
23032311
23042312 /// Called when the server attempts to open a channel of unknown type. It may return `true`,
@@ -2343,7 +2351,10 @@ pub trait Handler: Sized + Send {
23432351 reply : ChannelOpenHandle ,
23442352 session : & mut Session ,
23452353 ) -> impl Future < Output = Result < ( ) , Self :: Error > > + Send {
2346- async move { reply. accept ( ) . await ; Ok ( ( ) ) }
2354+ async move {
2355+ reply. accept ( ) . await ;
2356+ Ok ( ( ) )
2357+ }
23472358 }
23482359
23492360 /// Called when the server opens a direct tcp/ip channel (non-standard).
@@ -2352,6 +2363,7 @@ pub trait Handler: Sized + Send {
23522363 /// [`reply.reject(reason).await`](ChannelOpenHandle::reject) to decline.
23532364 /// Dropping `reply` automatically rejects.
23542365 #[ allow( unused_variables) ]
2366+ #[ allow( clippy:: too_many_arguments) ]
23552367 fn server_channel_open_direct_tcpip (
23562368 & mut self ,
23572369 channel : Channel < Msg > ,
@@ -2362,7 +2374,10 @@ pub trait Handler: Sized + Send {
23622374 reply : ChannelOpenHandle ,
23632375 session : & mut Session ,
23642376 ) -> impl Future < Output = Result < ( ) , Self :: Error > > + Send {
2365- async move { reply. accept ( ) . await ; Ok ( ( ) ) }
2377+ async move {
2378+ reply. accept ( ) . await ;
2379+ Ok ( ( ) )
2380+ }
23662381 }
23672382
23682383 /// Called when the server opens a direct-streamlocal channel (non-standard).
@@ -2378,7 +2393,10 @@ pub trait Handler: Sized + Send {
23782393 reply : ChannelOpenHandle ,
23792394 session : & mut Session ,
23802395 ) -> impl Future < Output = Result < ( ) , Self :: Error > > + Send {
2381- async move { reply. accept ( ) . await ; Ok ( ( ) ) }
2396+ async move {
2397+ reply. accept ( ) . await ;
2398+ Ok ( ( ) )
2399+ }
23822400 }
23832401
23842402 /// Called when the server opens an X11 channel.
@@ -2395,7 +2413,10 @@ pub trait Handler: Sized + Send {
23952413 reply : ChannelOpenHandle ,
23962414 session : & mut Session ,
23972415 ) -> impl Future < Output = Result < ( ) , Self :: Error > > + Send {
2398- async move { reply. accept ( ) . await ; Ok ( ( ) ) }
2416+ async move {
2417+ reply. accept ( ) . await ;
2418+ Ok ( ( ) )
2419+ }
23992420 }
24002421
24012422 /// Called when the server sends us data. The `extended_code`
0 commit comments