From 85c5ce955d78c042fc3fe5fc9d184335f8e17e88 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 30 Sep 2022 20:02:46 -0500 Subject: [PATCH] Clippy --- src/ffmpeg.rs | 2 +- src/generate.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ffmpeg.rs b/src/ffmpeg.rs index b5f8a9c..bceb3f1 100644 --- a/src/ffmpeg.rs +++ b/src/ffmpeg.rs @@ -266,7 +266,7 @@ pub(crate) async fn trancsocde_bytes( tmp_one.close().await?; let output_format = video_codec.to_output_format(); - let audio_codec = audio_codec.unwrap_or(output_format.default_audio_codec()); + let audio_codec = audio_codec.unwrap_or_else(|| output_format.default_audio_codec()); let process = if permit_audio { Process::run( diff --git a/src/generate.rs b/src/generate.rs index 73d874a..f39ff63 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -12,6 +12,7 @@ use std::path::PathBuf; use tokio::io::AsyncReadExt; use tracing::Instrument; +#[allow(clippy::too_many_arguments)] #[tracing::instrument(skip(hash))] pub(crate) async fn generate( repo: &R, @@ -42,6 +43,7 @@ pub(crate) async fn generate( Ok((details, bytes)) } +#[allow(clippy::too_many_arguments)] #[tracing::instrument(skip(hash))] async fn process( repo: &R,