fmt
This commit is contained in:
+4
-8
@@ -320,18 +320,14 @@ async fn download_file_checksum(
|
||||
match download_file_checksum_once(url, checksum, algo, target_dir, progress).await {
|
||||
Ok(()) => return Ok(()),
|
||||
Err(e) => {
|
||||
log::warn!(
|
||||
"download of '{url}' failed (attempt {attempt}/{ATTEMPTS}): {e}"
|
||||
);
|
||||
log::warn!("download of '{url}' failed (attempt {attempt}/{ATTEMPTS}): {e}");
|
||||
last_error = e;
|
||||
tokio::time::sleep(std::time::Duration::from_millis(500 * u64::from(attempt))).await;
|
||||
tokio::time::sleep(std::time::Duration::from_millis(500 * u64::from(attempt)))
|
||||
.await;
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(format!(
|
||||
"downloading '{url}' failed after {ATTEMPTS} attempts: {last_error}"
|
||||
)
|
||||
.into())
|
||||
Err(format!("downloading '{url}' failed after {ATTEMPTS} attempts: {last_error}").into())
|
||||
}
|
||||
|
||||
/// One download attempt of [`download_file_checksum`], verifying the
|
||||
|
||||
Reference in New Issue
Block a user