Remove pointless trait.

This commit is contained in:
Dessalines 2021-10-21 10:09:42 -04:00
parent a73e387ead
commit e175742c4f
3 changed files with 3 additions and 16 deletions

View File

@ -22,7 +22,6 @@ use lemmy_apub::{
objects::{community::ApubCommunity, person::ApubPerson},
};
use lemmy_db_schema::{
impls::community::CommunityModerator_,
source::{
comment::Comment,
community::{

View File

@ -25,7 +25,6 @@ use lemmy_apub_lib::{
values::PublicUrl,
};
use lemmy_db_schema::{
impls::community::CommunityModerator_,
source::community::{CommunityModerator, CommunityModeratorForm},
traits::Joinable,
};

View File

@ -204,19 +204,8 @@ impl DeleteableOrRemoveable for Community {
}
}
pub trait CommunityModerator_ {
fn delete_for_community(
conn: &PgConnection,
for_community_id: CommunityId,
) -> Result<usize, Error>;
fn get_person_moderated_communities(
conn: &PgConnection,
for_person_id: PersonId,
) -> Result<Vec<CommunityId>, Error>;
}
impl CommunityModerator_ for CommunityModerator {
fn delete_for_community(
impl CommunityModerator {
pub fn delete_for_community(
conn: &PgConnection,
for_community_id: CommunityId,
) -> Result<usize, Error> {
@ -224,7 +213,7 @@ impl CommunityModerator_ for CommunityModerator {
diesel::delete(community_moderator.filter(community_id.eq(for_community_id))).execute(conn)
}
fn get_person_moderated_communities(
pub fn get_person_moderated_communities(
conn: &PgConnection,
for_person_id: PersonId,
) -> Result<Vec<CommunityId>, Error> {