From 8f3f1dcc6fecbb83cd71a9207447c5441d6865e9 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 15 Sep 2023 15:31:01 -0400 Subject: [PATCH] Clippy --- src/processor.rs | 18 +++++++----------- src/queue/process.rs | 1 + 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/processor.rs b/src/processor.rs index 4dca9b7..dec45e8 100644 --- a/src/processor.rs +++ b/src/processor.rs @@ -110,18 +110,14 @@ pub(crate) fn build_chain( let (mut path, args) = args.iter() - .fold(Ok((PathBuf::default(), vec![])), |inner, (name, value)| { - if let Ok(inner) = inner { - parse!(inner, Identity, name, value); - parse!(inner, Thumbnail, name, value); - parse!(inner, Resize, name, value); - parse!(inner, Crop, name, value); - parse!(inner, Blur, name, value); + .try_fold((PathBuf::default(), vec![]), |inner, (name, value)| { + parse!(inner, Identity, name, value); + parse!(inner, Thumbnail, name, value); + parse!(inner, Resize, name, value); + parse!(inner, Crop, name, value); + parse!(inner, Blur, name, value); - Err(Error::from(UploadError::ParsePath)) - } else { - inner - } + Err(Error::from(UploadError::ParsePath)) })?; path.push(ext); diff --git a/src/queue/process.rs b/src/queue/process.rs index 9ee7eaf..80c59e9 100644 --- a/src/queue/process.rs +++ b/src/queue/process.rs @@ -100,6 +100,7 @@ impl Drop for LogDroppedIngest { } } +#[allow(clippy::too_many_arguments)] #[tracing::instrument(skip_all)] async fn process_ingest( repo: &R,