@@ -27,7 +27,6 @@ use std::process::Command;
2727use std:: fs;
2828use std:: env;
2929use std:: io:: Read ;
30- // use tokio::fs::File; // Unused import
3130use tokio:: io:: { AsyncWriteExt , BufWriter } ;
3231
3332/// Base URL for downloading images
@@ -269,7 +268,6 @@ fn image_list() -> Result<()> {
269268 }
270269
271270 Ok ( ( ) )
272- // Return Ok to indicate successful execution
273271}
274272
275273/// Download the specified image and optionally extract it
@@ -312,11 +310,6 @@ async fn image_download(image_name: &str, output_dir: Option<String>, extract: b
312310 }
313311 } ;
314312
315- // Build download URL
316- let download_url = format ! ( "{}{}.tar.gz" , IMAGE_URL_BASE , image. name) ;
317-
318- println ! ( "Downloading image: {image_name}" ) ;
319-
320313 // Check if file exists, if so verify SHA256
321314 if output_path. exists ( ) {
322315 match image_verify_sha256 ( & output_path, image. sha256 ) {
@@ -342,7 +335,9 @@ async fn image_download(image_name: &str, output_dir: Option<String>, extract: b
342335 fs:: create_dir_all ( parent) ?;
343336 }
344337
345- println ! ( "Starting download..." ) ;
338+ // Build download URL
339+ let download_url = format ! ( "{}{}.tar.gz" , IMAGE_URL_BASE , image. name) ;
340+ println ! ( "Downloading: {download_url}" ) ;
346341
347342 // Use reqwest to download the file
348343 let mut response = reqwest:: get ( & download_url) . await ?;
0 commit comments