mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 13:51:19 +00:00
clippy
This commit is contained in:
parent
8414b58662
commit
716143b126
1 changed files with 2 additions and 2 deletions
|
@ -322,11 +322,11 @@ pub async fn replace_image(
|
|||
if new_image.is_some() {
|
||||
// Ignore errors because image may be stored externally.
|
||||
if let Some(avatar) = &old_image {
|
||||
let image = LocalImage::delete_by_url(&mut context.pool(), &avatar)
|
||||
let image = LocalImage::delete_by_url(&mut context.pool(), avatar)
|
||||
.await
|
||||
.ok();
|
||||
if let Some(image) = image {
|
||||
delete_image_from_pictrs(&image.pictrs_alias, &image.pictrs_delete_token, &context).await?;
|
||||
delete_image_from_pictrs(&image.pictrs_alias, &image.pictrs_delete_token, context).await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue