fix: v1.67 clippy lints (inline format strings)

This commit is contained in:
ThetaDev 2023-01-27 21:19:08 +01:00
parent 15dad0c428
commit 331a13568a
33 changed files with 200 additions and 288 deletions

View file

@ -48,11 +48,7 @@ fn parse_cr_header(cr_header: &str) -> Result<(u64, u64)> {
let captures = PATTERN.captures(cr_header).ok_or_else(|| {
DownloadError::Progressive(
format!(
"Content-Range header '{}' does not match pattern",
cr_header
)
.into(),
format!("Content-Range header '{cr_header}' does not match pattern").into(),
)
})?;
@ -348,7 +344,7 @@ pub async fn download_video(
match (video, audio) {
// Downloading combined video/audio stream (no conversion)
(Some(video), None) => {
pb.set_message(format!("Downloading {}", title));
pb.set_message(format!("Downloading {title}"));
download_single_file(
&video.url,
download_dir.join(output_fname).with_extension(&format),
@ -386,10 +382,10 @@ pub async fn download_video(
})
}
pb.set_message(format!("Downloading {}", title));
pb.set_message(format!("Downloading {title}"));
download_streams(&downloads, http, pb.clone()).await?;
pb.set_message(format!("Converting {}", title));
pb.set_message(format!("Converting {title}"));
pb.set_style(
ProgressStyle::with_template("{msg}\n{spinner:.green} [{elapsed_precise}]")
.unwrap(),