diff --git a/crates/api/src/comment/like.rs b/crates/api/src/comment/like.rs index 3d216872a..6946b60c8 100644 --- a/crates/api/src/comment/like.rs +++ b/crates/api/src/comment/like.rs @@ -72,8 +72,7 @@ impl Perform for CreateCommentLike { // Only add the like if the score isnt 0 let do_add = like_form.score != 0 && (like_form.score == 1 || like_form.score == -1); if do_add { - let like_form2 = like_form.clone(); - CommentLike::like(context.pool(), &like_form2) + CommentLike::like(context.pool(), &like_form) .await .map_err(|e| LemmyError::from_error_message(e, "couldnt_like_comment"))?; } diff --git a/crates/api/src/post/like.rs b/crates/api/src/post/like.rs index 53e6c13c6..9fa480a5b 100644 --- a/crates/api/src/post/like.rs +++ b/crates/api/src/post/like.rs @@ -60,8 +60,7 @@ impl Perform for CreatePostLike { // Only add the like if the score isnt 0 let do_add = like_form.score != 0 && (like_form.score == 1 || like_form.score == -1); if do_add { - let like_form2 = like_form.clone(); - PostLike::like(context.pool(), &like_form2) + PostLike::like(context.pool(), &like_form) .await .map_err(|e| LemmyError::from_error_message(e, "couldnt_like_post"))?; } diff --git a/crates/api_crud/src/comment/create.rs b/crates/api_crud/src/comment/create.rs index 511059ac9..103c71ce6 100644 --- a/crates/api_crud/src/comment/create.rs +++ b/crates/api_crud/src/comment/create.rs @@ -107,9 +107,8 @@ impl PerformCrud for CreateComment { .build(); // Create the comment - let comment_form2 = comment_form.clone(); let parent_path = parent_opt.clone().map(|t| t.path); - let inserted_comment = Comment::create(context.pool(), &comment_form2, parent_path.as_ref()) + let inserted_comment = Comment::create(context.pool(), &comment_form, parent_path.as_ref()) .await .map_err(|e| LemmyError::from_error_message(e, "couldnt_create_comment"))?;