chore: more linting

This commit is contained in:
alterware
2025-07-03 10:32:57 +02:00
parent 2dab50111b
commit a2e4f304dc
2 changed files with 5 additions and 11 deletions

View File

@@ -64,8 +64,8 @@ pub async fn rating_request(
let latency = start.elapsed();
if let Err(e) = &res {
error!("Failed to get {}: {} (after {:?})", url, e, latency);
return Err(format!("Failed to get {} {} (after {:?})", url, e, latency).into());
error!("Failed to get {url}: {e} (after {latency:?})");
return Err(format!("Failed to get {url} {e} (after {latency:?})").into());
}
let res = res.unwrap();
@@ -74,17 +74,11 @@ pub async fn rating_request(
// We don't need the response body for rating
if let Err(e) = res.text().await {
warn!(
"Failed to get response text from {}: {} (after {:?})",
url, e, latency
);
warn!("Failed to get response text from {url}: {e} (after {latency:?})");
return Err(e.into());
}
info!(
"Successfully rated {} in {:?} (cloudflare: {})",
url, latency, is_cloudflare
);
info!("Successfully rated {url} in {latency:?} (cloudflare: {is_cloudflare})");
Ok((latency, is_cloudflare))
}

View File

@@ -53,7 +53,7 @@ pub fn is_program_in_path(program: &str) -> bool {
.and_then(|paths| {
paths.to_str().map(|paths| {
paths.split(';').any(|dir| {
fs::metadata(format!("{}\\{}.exe", dir, program)).is_ok()
fs::metadata(format!("{dir}\\{program}.exe")).is_ok()
|| fs::metadata(format!("{dir}\\{program}.cmd")).is_ok()
|| fs::metadata(format!("{dir}\\{program}.bat")).is_ok()
})