@@ -92,9 +92,7 @@ impl ProxySocket<ShadowUdpSocket> {
9292 context : SharedContext ,
9393 svr_cfg : & ServerConfig ,
9494 ) -> ProxySocketResult < ProxySocket < ShadowUdpSocket > > {
95- ProxySocket :: connect_with_opts ( context, svr_cfg, & DEFAULT_CONNECT_OPTS )
96- . await
97- . map_err ( Into :: into)
95+ ProxySocket :: connect_with_opts ( context, svr_cfg, & DEFAULT_CONNECT_OPTS ) . await
9896 }
9997
10098 /// Create a client to communicate with Shadowsocks' UDP server (outbound)
@@ -127,9 +125,7 @@ impl ProxySocket<ShadowUdpSocket> {
127125 context : SharedContext ,
128126 svr_cfg : & ServerConfig ,
129127 ) -> ProxySocketResult < ProxySocket < ShadowUdpSocket > > {
130- ProxySocket :: bind_with_opts ( context, svr_cfg, AcceptOpts :: default ( ) )
131- . await
132- . map_err ( Into :: into)
128+ ProxySocket :: bind_with_opts ( context, svr_cfg, AcceptOpts :: default ( ) ) . await
133129 }
134130
135131 /// Create a `ProxySocket` binding to a specific address (inbound)
@@ -240,9 +236,7 @@ where
240236 /// Send a UDP packet to addr through proxy
241237 #[ inline]
242238 pub async fn send ( & self , addr : & Address , payload : & [ u8 ] ) -> ProxySocketResult < usize > {
243- self . send_with_ctrl ( addr, & DEFAULT_SOCKET_CONTROL , payload)
244- . await
245- . map_err ( Into :: into)
239+ self . send_with_ctrl ( addr, & DEFAULT_SOCKET_CONTROL , payload) . await
246240 }
247241
248242 /// Send a UDP packet to addr through proxy with `ControlData`
@@ -391,9 +385,7 @@ where
391385
392386 /// Send a UDP packet to target through proxy `target`
393387 pub async fn send_to ( & self , target : SocketAddr , addr : & Address , payload : & [ u8 ] ) -> ProxySocketResult < usize > {
394- self . send_to_with_ctrl ( target, addr, & DEFAULT_SOCKET_CONTROL , payload)
395- . await
396- . map_err ( Into :: into)
388+ self . send_to_with_ctrl ( target, addr, & DEFAULT_SOCKET_CONTROL , payload) . await
397389 }
398390
399391 /// Send a UDP packet to target through proxy `target`
0 commit comments