From 1271ff2cc7cfb37673c5662f66136cad91e2b9cc Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 28 Aug 2023 18:49:30 -0500 Subject: [PATCH] Clippy --- src/processor.rs | 18 +++++++----------- 1 file changed, 7 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);