From c3dea70bb68b005477099b0edd5b9d99ee7e938d Mon Sep 17 00:00:00 2001 From: fozzie Date: Fri, 15 Aug 2025 00:05:12 -0500 Subject: [PATCH] Inline format args for clippy --- src/handler.rs | 10 +++++----- src/main.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/handler.rs b/src/handler.rs index a72be4d..b284c77 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -47,7 +47,7 @@ pub struct CheckCanaryFormData{ type CheckResponse = (StatusCode, Html); fn error_response(code: StatusCode, error: String) -> CheckResponse { - error!("Error: {}", error); + error!("Error: {error}"); (code, Html(ShowCheckFormTemplate{ url: None, message: None, @@ -69,8 +69,8 @@ pub async fn check_canary_result( "URI missing from form data".to_string()); }; match headers.get("X-Forwarded-For") { - Some(remote_addr) => info!("IP {:?} ... Checking canary at {}", remote_addr, uri), - None => info!("IP unavailable ... Checking canary at {}", uri), + Some(remote_addr) => info!("IP {remote_addr:?} ... Checking canary at {uri}"), + None => info!("IP unavailable ... Checking canary at {uri}"), } match ureq::get(uri.clone()).call() { Ok(mut resp) => @@ -82,11 +82,11 @@ pub async fn check_canary_result( }, Err(e) => error_response(StatusCode::BAD_REQUEST, - format!("Error decoding signed message to string: {}",e)) + format!("Error decoding signed message to string: {e}")) }, Err(e) => error_response(StatusCode::INTERNAL_SERVER_ERROR, - format!("Error reading message from upstream: {}",e)) + format!("Error reading message from upstream: {e}")) } } diff --git a/src/main.rs b/src/main.rs index e538b0c..b20b336 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,8 +59,8 @@ async fn main() -> Result<(),Box> { Ok(val) => val, Err(_) => "/".to_string() }; - info!("App root is {}",app_root); - info!("Will listen on {}:{}", bind_host, bind_port); + info!("App root is {app_root}"); + info!("Will listen on {bind_host}:{bind_port}"); let certs = load_certs_from_fs().await.unwrap(); info!("Loaded {} certs from trust/", certs.len()); -- 2.52.0