From faef62e073086b3fbc11ee36bde0e8e8c96e24a6 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 9 Dec 2019 11:08:19 -0800 Subject: Switching to shorthands for rust params. --- server/src/api/community.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'server/src/api/community.rs') diff --git a/server/src/api/community.rs b/server/src/api/community.rs index 5bd60007..9492d75d 100644 --- a/server/src/api/community.rs +++ b/server/src/api/community.rs @@ -163,8 +163,8 @@ impl Perform for Oper { Ok(GetCommunityResponse { op: self.op.to_string(), community: community_view, - moderators: moderators, - admins: admins, + moderators, + admins, }) } } @@ -213,7 +213,7 @@ impl Perform for Oper { let community_moderator_form = CommunityModeratorForm { community_id: inserted_community.id, - user_id: user_id, + user_id, }; let _inserted_community_moderator = @@ -229,7 +229,7 @@ impl Perform for Oper { let community_follower_form = CommunityFollowerForm { community_id: inserted_community.id, - user_id: user_id, + user_id, }; let _inserted_community_follower = @@ -310,7 +310,7 @@ impl Perform for Oper { community_id: data.edit_id, removed: Some(removed), reason: data.reason.to_owned(), - expires: expires, + expires, }; ModRemoveCommunity::create(&conn, &form)?; } @@ -360,7 +360,7 @@ impl Perform for Oper { // Return the jwt Ok(ListCommunitiesResponse { op: self.op.to_string(), - communities: communities, + communities, }) } } @@ -379,7 +379,7 @@ impl Perform for Oper { let community_follower_form = CommunityFollowerForm { community_id: data.community_id, - user_id: user_id, + user_id, }; if data.follow { @@ -424,7 +424,7 @@ impl Perform for Oper { // Return the jwt Ok(GetFollowedCommunitiesResponse { op: self.op.to_string(), - communities: communities, + communities, }) } } @@ -470,7 +470,7 @@ impl Perform for Oper { community_id: data.community_id, reason: data.reason.to_owned(), banned: Some(data.ban), - expires: expires, + expires, }; ModBanFromCommunity::create(&conn, &form)?; @@ -536,7 +536,7 @@ impl Perform for Oper { Ok(AddModToCommunityResponse { op: self.op.to_string(), - moderators: moderators, + moderators, }) } } @@ -641,8 +641,8 @@ impl Perform for Oper { Ok(GetCommunityResponse { op: self.op.to_string(), community: community_view, - moderators: moderators, - admins: admins, + moderators, + admins, }) } } -- cgit v1.2.3