From e25436576ab5eec06e7afd015b2a66332eaf6778 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 20 Dec 2020 23:00:33 -0500 Subject: [PATCH] Fixing some clippy warnings. --- lemmy_apub/src/inbox/community_inbox.rs | 2 +- lemmy_apub/src/inbox/receive_for_community.rs | 4 ++-- lemmy_apub/src/inbox/user_inbox.rs | 2 +- lemmy_apub/src/objects/comment.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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) } -- 2.44.1