type CheckResponse = (StatusCode, Html<std::string::String>);
fn error_response(code: StatusCode, error: String) -> CheckResponse {
- error!("Error: {}", error);
+ error!("Error: {error}");
(code, Html(ShowCheckFormTemplate{
url: None,
message: None,
"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) =>
},
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}"))
}
}
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());