@@ -18,7 +18,6 @@ use log::{debug, error};
1818use reqwest:: Upgraded ;
1919use std:: {
2020 future:: Future ,
21- io:: ErrorKind ,
2221 net:: { Ipv4Addr , SocketAddr , SocketAddrV4 } ,
2322 pin:: Pin ,
2423 sync:: Arc ,
@@ -85,10 +84,7 @@ pub async fn start_tunnel_server(ctx: Arc<ClientContext>) -> std::io::Result<()>
8584 tokio:: time:: sleep ( reconnect_time) . await ;
8685 }
8786
88- Err ( last_error. unwrap_or ( std:: io:: Error :: new (
89- ErrorKind :: Other ,
90- "Reached error connect limit" ,
91- ) ) )
87+ Err ( last_error. unwrap_or ( std:: io:: Error :: other ( "Reached error connect limit" ) ) )
9288}
9389
9490/// Creates a new tunnel
@@ -103,7 +99,7 @@ async fn create_tunnel(ctx: Arc<ClientContext>, association: &str) -> std::io::R
10399 // Wrap the tunnel with the [`TunnelCodec`] framing
104100 . map ( |io| Framed :: new ( io, TunnelCodec :: default ( ) ) )
105101 // Wrap the error into an [`std::io::Error`]
106- . map_err ( |err| std:: io:: Error :: new ( ErrorKind :: Other , err ) ) ?;
102+ . map_err ( std:: io:: Error :: other ) ?;
107103 debug ! ( "Created server tunnel" ) ;
108104
109105 // Allocate the socket pool for the tunnel
@@ -496,7 +492,7 @@ mod codec {
496492 //! Tunnel message frames are as follows:
497493 //!
498494 //! ```text
499- //! 0 1 2
495+ //! 0 1 2
500496 //! 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
501497 //! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
502498 //! | Index | Length |
0 commit comments