make clippy happy

This commit is contained in:
B. Petersen
2020-06-05 23:51:32 +02:00
parent 191009372b
commit d5ea4f9b1a
2 changed files with 12 additions and 4 deletions

View File

@@ -1333,10 +1333,8 @@ async fn prepare_msg_blob(context: &Context, msg: &mut Message) -> Result<(), Er
format_err!("Attachment missing for message of type #{}", msg.viewtype)
})?;
if msg.viewtype == Viewtype::Image {
if blob.recode_to_image_size(context).await.is_err() {
warn!(context, "Cannot recode image, using original data");
}
if msg.viewtype == Viewtype::Image && blob.recode_to_image_size(context).await.is_err() {
warn!(context, "Cannot recode image, using original data");
}
msg.param.set(Param::File, blob.as_name());