From 1ed62dc18c49eaebbf6be07973502be3685d26a4 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 26 Nov 2021 15:33:19 +0100 Subject: [PATCH] Proxy's still not working sadly --- src/proxy.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/proxy.rs b/src/proxy.rs index a9fcf3e..fce6510 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -94,11 +94,7 @@ impl Handler for ProxyServer // We first extract all URL segments starting from the mountpoint let segments: PathBuf = req.segments(0..).unwrap(); - let query_part = if let Some(query) = req.uri().query() { - format!("?{}", query) - }else{ - String::from("") - }; + let query_part = req.uri().query().map_or(String::from(""), |s| format!("?{}", s)); let url = format!( "{}{}/{}{}",