From: Dessalines Date: Mon, 21 Dec 2020 04:00:33 +0000 (-0500) Subject: Fixing some clippy warnings. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%22%7Burl%7D/%7BcanonicalUrl%7D?a=commitdiff_plain;h=e25436576ab5eec06e7afd015b2a66332eaf6778;p=lemmy.git Fixing some clippy warnings. --- diff --git a/lemmy_apub/src/inbox/community_inbox.rs b/lemmy_apub/src/inbox/community_inbox.rs index a2bed621..ec4d30ae 100644 --- a/lemmy_apub/src/inbox/community_inbox.rs +++ b/lemmy_apub/src/inbox/community_inbox.rs @@ -179,7 +179,7 @@ pub(crate) async fn community_receive_message( .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 diff --git a/lemmy_apub/src/inbox/receive_for_community.rs b/lemmy_apub/src/inbox/receive_for_community.rs index 73deb971..ff160144 100644 --- a/lemmy_apub/src/inbox/receive_for_community.rs +++ b/lemmy_apub/src/inbox/receive_for_community.rs @@ -350,7 +350,7 @@ async fn find_post_or_comment_by_id( return Ok(PostOrComment::Comment(c)); } - return Err(NotFound.into()); + Err(NotFound.into()) } 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 Err(NotFound.into()); + Err(NotFound.into()) } fn get_like_object_id(like_or_dislike: &Activity) -> Result diff --git a/lemmy_apub/src/inbox/user_inbox.rs b/lemmy_apub/src/inbox/user_inbox.rs index 374772d6..dc387739 100644 --- a/lemmy_apub/src/inbox/user_inbox.rs +++ b/lemmy_apub/src/inbox/user_inbox.rs @@ -396,5 +396,5 @@ async fn find_community_or_private_message_by_id( return Ok(CommunityOrPrivateMessage::PrivateMessage(p)); } - return Err(NotFound.into()); + Err(NotFound.into()) } diff --git a/lemmy_apub/src/objects/comment.rs b/lemmy_apub/src/objects/comment.rs index 957966d7..0d1f6db8 100644 --- a/lemmy_apub/src/objects/comment.rs +++ b/lemmy_apub/src/objects/comment.rs @@ -118,7 +118,7 @@ impl FromApub for Comment { Comment::delete(conn, comment.id) }) .await??; - return Err(anyhow!("Post is locked").into()); + Err(anyhow!("Post is locked").into()) } else { Ok(comment) }