@@ -749,7 +749,9 @@ fn proxied_target_port(target_id: &str) -> Result<u16, String> {
749749fn metro_devtools_frontend_url ( port : u16 , entry : & Value , web_socket_debugger_url : & str ) -> String {
750750 let frontend = string_value ( entry, "devtoolsFrontendUrl" ) ;
751751 let asset_path = metro_frontend_asset_path ( frontend. as_deref ( ) ) ;
752- let query = frontend. as_deref ( ) . and_then ( |value| split_path_query ( value) . 1 ) ;
752+ let query = frontend
753+ . as_deref ( )
754+ . and_then ( |value| split_path_query ( value) . 1 ) ;
753755 // Reverse-proxy Metro's own (version-matched) Fusebox frontend through the
754756 // SimDeck origin so the LAN client and Studio app can reach it, with the
755757 // socket rewritten to the proxied inspector path.
@@ -846,8 +848,9 @@ pub async fn fetch_metro_frontend_asset(
846848 . await
847849 . map_err ( |_| format ! ( "Timed out connecting to Metro at {address}." ) ) ?
848850 . map_err ( |error| format ! ( "Unable to connect to Metro at {address}: {error}" ) ) ?;
849- let request =
850- format ! ( "GET {target} HTTP/1.1\r \n Host: {address}\r \n Accept: */*\r \n Connection: close\r \n \r \n " ) ;
851+ let request = format ! (
852+ "GET {target} HTTP/1.1\r \n Host: {address}\r \n Accept: */*\r \n Connection: close\r \n \r \n "
853+ ) ;
851854 timeout ( METRO_ASSET_TIMEOUT , stream. write_all ( request. as_bytes ( ) ) )
852855 . await
853856 . map_err ( |_| "Timed out requesting Metro asset." . to_owned ( ) ) ?
@@ -1773,9 +1776,7 @@ mod tests {
17731776 #[ test]
17741777 fn upstream_websocket_origin_matches_metro_dev_server ( ) {
17751778 assert_eq ! (
1776- upstream_websocket_origin(
1777- "ws://127.0.0.1:8082/inspector/debug?device=abc&page=1"
1778- ) ,
1779+ upstream_websocket_origin( "ws://127.0.0.1:8082/inspector/debug?device=abc&page=1" ) ,
17791780 Some ( "http://127.0.0.1:8082" . to_owned( ) )
17801781 ) ;
17811782 assert_eq ! (
0 commit comments