File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
apps/pyth-lazer-agent/src Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,9 @@ async fn connect_through_proxy(
6060 80
6161 } ) ;
6262
63- let mut connect_request =
64- format ! ( "CONNECT {target_host}:{target_port} HTTP/1.1\r \n Host: {target_host}:{target_port}\r \n " ) ;
63+ let mut connect_request = format ! (
64+ "CONNECT {target_host}:{target_port} HTTP/1.1\r \n Host: {target_host}:{target_port}\r \n "
65+ ) ;
6566
6667 let username = proxy_url. username ( ) ;
6768 if !username. is_empty ( ) {
@@ -84,11 +85,8 @@ async fn connect_through_proxy(
8485 . await
8586 . context ( "Failed to read CONNECT response from proxy" ) ?;
8687
87- let response_str = String :: from_utf8_lossy (
88- response
89- . get ( ..n)
90- . context ( "Invalid response slice range" ) ?,
91- ) ;
88+ let response_str =
89+ String :: from_utf8_lossy ( response. get ( ..n) . context ( "Invalid response slice range" ) ?) ;
9290
9391 if !response_str. starts_with ( "HTTP/1.1 200" ) && !response_str. starts_with ( "HTTP/1.0 200" ) {
9492 bail ! (
You can’t perform that action at this time.
0 commit comments