From: fozzie Date: Fri, 15 Aug 2025 05:05:12 +0000 (-0500) Subject: Inline format args for clippy X-Git-Url: https://git.humopery.space/?a=commitdiff_plain;h=c3dea70bb68b005477099b0edd5b9d99ee7e938d;p=waterslager.git Inline format args for clippy --- 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());