Fixing some clippy warnings.

This commit is contained in:
Dessalines 2020-12-20 23:00:33 -05:00
parent 8e1f41f1e4
commit e25436576a
4 changed files with 5 additions and 5 deletions

View File

@ -179,7 +179,7 @@ pub(crate) async fn community_receive_message(
.await?; .await?;
} }
return Ok(HttpResponse::Ok().finish()); Ok(HttpResponse::Ok().finish())
} }
/// Handle a follow request from a remote user, adding the user as follower and returning an /// Handle a follow request from a remote user, adding the user as follower and returning an

View File

@ -350,7 +350,7 @@ async fn find_post_or_comment_by_id(
return Ok(PostOrComment::Comment(c)); return Ok(PostOrComment::Comment(c));
} }
return Err(NotFound.into()); Err(NotFound.into())
} }
async fn fetch_post_or_comment_by_id( async fn fetch_post_or_comment_by_id(
@ -366,7 +366,7 @@ async fn fetch_post_or_comment_by_id(
return Ok(PostOrComment::Comment(comment)); return Ok(PostOrComment::Comment(comment));
} }
return Err(NotFound.into()); Err(NotFound.into())
} }
fn get_like_object_id<Activity>(like_or_dislike: &Activity) -> Result<Url, LemmyError> fn get_like_object_id<Activity>(like_or_dislike: &Activity) -> Result<Url, LemmyError>

View File

@ -396,5 +396,5 @@ async fn find_community_or_private_message_by_id(
return Ok(CommunityOrPrivateMessage::PrivateMessage(p)); return Ok(CommunityOrPrivateMessage::PrivateMessage(p));
} }
return Err(NotFound.into()); Err(NotFound.into())
} }

View File

@ -118,7 +118,7 @@ impl FromApub for Comment {
Comment::delete(conn, comment.id) Comment::delete(conn, comment.id)
}) })
.await??; .await??;
return Err(anyhow!("Post is locked").into()); Err(anyhow!("Post is locked").into())
} else { } else {
Ok(comment) Ok(comment)
} }