From c7110fbbe7790198c5aa5abffe8bb9336018c9f2 Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Sun, 22 Mar 2026 14:42:43 -0400 Subject: [PATCH] clippy --- shanty-data/src/mb_import.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/shanty-data/src/mb_import.rs b/shanty-data/src/mb_import.rs index e43741c..ead908c 100644 --- a/shanty-data/src/mb_import.rs +++ b/shanty-data/src/mb_import.rs @@ -591,14 +591,15 @@ pub async fn download_dump( // Skip if we already have this file from the same dump timestamp let stamp_path = target_dir.join(format!("{filename}.timestamp")); - if target_path.exists() { - if let Ok(existing_stamp) = std::fs::read_to_string(&stamp_path) { - if existing_stamp.trim() == timestamp { - progress(&format!("Skipping {filename} (already downloaded from {timestamp})")); - tracing::info!(file = %filename, timestamp = %timestamp, "dump file already up to date, skipping download"); - return Ok(target_path); - } - } + if target_path.exists() + && let Ok(existing_stamp) = std::fs::read_to_string(&stamp_path) + && existing_stamp.trim() == timestamp + { + progress(&format!( + "Skipping {filename} (already downloaded from {timestamp})" + )); + tracing::info!(file = %filename, timestamp = %timestamp, "dump file already up to date, skipping download"); + return Ok(target_path); } progress(&format!("Downloading {filename}..."));