From 9c290b6ef4aba91c2849e7112eee1c758a586aef Mon Sep 17 00:00:00 2001 From: Razvan Dimescu Date: Mon, 23 Mar 2026 07:13:58 +0200 Subject: [PATCH] fmt: fix proxy.rs formatting for CI rustfmt Co-Authored-By: Claude Opus 4.6 (1M context) --- src/proxy.rs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/proxy.rs b/src/proxy.rs index 087017b..c4c2ca6 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -50,7 +50,12 @@ pub async fn start_proxy(ctx: Arc, port: u16, bind_addr: Ipv4Addr) { axum::serve(listener, app).await.unwrap(); } -pub async fn start_proxy_tls(ctx: Arc, port: u16, bind_addr: Ipv4Addr, tls_config: Arc) { +pub async fn start_proxy_tls( + ctx: Arc, + port: u16, + bind_addr: Ipv4Addr, + tls_config: Arc, +) { let addr: SocketAddr = (bind_addr, port).into(); let listener = match tokio::net::TcpListener::bind(addr).await { Ok(l) => l, @@ -271,11 +276,17 @@ pre .str {{ color: #d48a5a }} } }; - let query_string = req.uri().query().map(|q| format!("?{}", q)).unwrap_or_default(); - let target_uri: hyper::Uri = - format!("http://{}:{}{}{}", target_host, target_port, rewritten_path, query_string) - .parse() - .unwrap(); + let query_string = req + .uri() + .query() + .map(|q| format!("?{}", q)) + .unwrap_or_default(); + let target_uri: hyper::Uri = format!( + "http://{}:{}{}{}", + target_host, target_port, rewritten_path, query_string + ) + .parse() + .unwrap(); // Check for upgrade request (WebSocket, etc.) let is_upgrade = req.headers().get(hyper::header::UPGRADE).is_some();