clippy
All checks were successful
CI/CD Pipeline / test (push) Successful in 1m16s
CI/CD Pipeline / deploy (push) Successful in 1m5s

This commit is contained in:
2025-07-21 21:32:06 +02:00
parent c31ad4290e
commit 98b827400c

View File

@@ -8,13 +8,13 @@ pub async fn spawn_download_task(url: &str, state: Arc<AppState>) {
let url = url.to_string();
tokio::spawn(async move {
if let Err(e) = download_stream(&url, state).await {
eprintln!("Download failed: {}", e);
eprintln!("Download failed: {e}");
}
});
}
async fn download_stream(url: &str, state: Arc<AppState>) -> Result<(), reqwest::Error> {
println!("Starting download from: {}", url);
println!("Starting download from: {url}");
let response = reqwest::Client::new().get(url).send().await?;
let mut stream = response.bytes_stream();
@@ -33,7 +33,7 @@ async fn download_stream(url: &str, state: Arc<AppState>) -> Result<(), reqwest:
}
state.mark_complete().await;
println!("Download complete! Total: {} bytes", total_size);
println!("Download complete! Total: {total_size} bytes");
Ok(())
}