Skip to content

Commit 0d924d3

Browse files
committed
Log worker download url human readable
1 parent b67b26d commit 0d924d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

worker/src/download.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use tokio::fs::File;
55
use tokio::io::AsyncWriteExt;
66
use url::Url;
77

8-
pub async fn download(url: &str, path: &Path) -> Result<PathBuf> {
9-
let url = url.parse::<Url>()
8+
pub async fn download(url_str: &str, path: &Path) -> Result<PathBuf> {
9+
let url = url_str.parse::<Url>()
1010
.context("Failed to parse input as url")?;
1111

1212
let filename = url.path_segments()
@@ -19,7 +19,7 @@ pub async fn download(url: &str, path: &Path) -> Result<PathBuf> {
1919

2020
let target = path.join(filename);
2121

22-
info!("Downloading {:?} to {:?}", url, target);
22+
info!("Downloading {:?} to {:?}", url_str, target);
2323
let client = reqwest::Client::new();
2424
let mut stream = client.get(&url.to_string())
2525
.send()

0 commit comments

Comments
 (0)