mirror of
https://git.asonix.dog/asonix/pict-rs.git
synced 2024-12-01 05:51:07 +00:00
clippy
This commit is contained in:
parent
9ffdd0432f
commit
8f62b0c325
3 changed files with 6 additions and 7 deletions
|
@ -31,7 +31,7 @@ where
|
|||
let output_arg = format!("{}:-", format.magick_format());
|
||||
let quality = quality.map(|q| q.to_string());
|
||||
|
||||
let len = format.coalesce().then(|| 4).unwrap_or(3) + quality.is_some().then(|| 1).unwrap_or(0);
|
||||
let len = 3 + if format.coalesce() { 1 } else { 0 } + if quality.is_some() { 1 } else { 0 };
|
||||
|
||||
let mut args: Vec<&str> = Vec::with_capacity(len);
|
||||
args.push("convert");
|
||||
|
|
|
@ -82,7 +82,7 @@ where
|
|||
}
|
||||
};
|
||||
|
||||
let processed_reader = crate::magick::process_image_async_read(
|
||||
crate::magick::process_image_async_read(
|
||||
validated_reader,
|
||||
magick_args,
|
||||
format,
|
||||
|
@ -90,9 +90,7 @@ where
|
|||
quality,
|
||||
media.process_timeout,
|
||||
)
|
||||
.await?;
|
||||
|
||||
processed_reader
|
||||
.await?
|
||||
} else {
|
||||
validated_reader
|
||||
}
|
||||
|
|
|
@ -117,8 +117,9 @@ where
|
|||
let output_arg = format!("{}:-", format.magick_format());
|
||||
let quality = quality.map(|q| q.to_string());
|
||||
|
||||
let len = format.coalesce().then(|| 4).unwrap_or(3)
|
||||
+ quality.is_some().then(|| 1).unwrap_or(0)
|
||||
let len = 3
|
||||
+ if format.coalesce() { 1 } else { 0 }
|
||||
+ if quality.is_some() { 1 } else { 0 }
|
||||
+ process_args.len();
|
||||
|
||||
let mut args: Vec<&str> = Vec::with_capacity(len);
|
||||
|
|
Loading…
Reference in a new issue