diff --git a/src/main.rs b/src/main.rs index e4492b7..b1a62b3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,7 @@ async fn main() -> Result<()> { Ok(()) } fn host_addr(uri: &http::Uri) -> Option { - uri.authority().and_then(|auth| Some(auth.to_string())) + uri.authority().map(|auth| auth.to_string()) } async fn proxy(req: Request, socks_address: SocketAddr) -> Result> { let mut connector = HttpConnector::new();