File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ use tokio::fs::File;
55use tokio:: io:: AsyncWriteExt ;
66use 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 ( )
You can’t perform that action at this time.
0 commit comments