]> Untitled Git - lemmy.git/commitdiff
Fixing some clippy warnings.
authorDessalines <tyhou13@gmx.com>
Mon, 21 Dec 2020 04:00:33 +0000 (23:00 -0500)
committerDessalines <tyhou13@gmx.com>
Mon, 21 Dec 2020 04:00:33 +0000 (23:00 -0500)
lemmy_apub/src/inbox/community_inbox.rs
lemmy_apub/src/inbox/receive_for_community.rs
lemmy_apub/src/inbox/user_inbox.rs
lemmy_apub/src/objects/comment.rs

index a2bed621cc9a41eb69fe7dbc03df1891f6da9a6a..ec4d30ae8f06f8c08f2e056c75eb0a44291485a3 100644 (file)
@@ -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
index 73deb97176e832b1c89e134c975e12828f1dfce9..ff160144fb06214d3f347e4c71466185f9f2e3ec 100644 (file)
@@ -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<Activity>(like_or_dislike: &Activity) -> Result<Url, LemmyError>
index 374772d6d99986fc5883041d4dd2db6ab537f88c..dc387739b582d58dac9ed4fd9b509b90d04e3d61 100644 (file)
@@ -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())
 }
index 957966d7fe2abac86318ce596a6b01d11b60e361..0d1f6db80d442c1fa4852f5b8c49dea7a2d24140 100644 (file)
@@ -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)
     }