fix: error with clippy 1.65

This commit is contained in:
ThetaDev 2022-11-04 19:59:41 +01:00
parent a706eb172e
commit f748b98ccc

View file

@ -150,7 +150,7 @@ async fn download_single_file<P: Into<PathBuf>>(
let mut file = fs::OpenOptions::new() let mut file = fs::OpenOptions::new()
.append(true) .append(true)
.create(true) .create(true)
.open(output_path_tmp.to_owned()) .open(&output_path_tmp)
.await?; .await?;
if is_gvideo && size.is_some() { if is_gvideo && size.is_some() {
@ -159,7 +159,7 @@ async fn download_single_file<P: Into<PathBuf>>(
download_chunks_by_header(http, &mut file, url, size, offset, pb).await?; download_chunks_by_header(http, &mut file, url, size, offset, pb).await?;
} }
fs::rename(output_path_tmp, output_path).await?; fs::rename(&output_path_tmp, &output_path).await?;
Ok(()) Ok(())
} }