summaryrefslogtreecommitdiffstats
path: root/server/src/apub/community.rs
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-04-24 17:30:27 -0400
committerDessalines <tyhou13@gmx.com>2020-04-24 17:30:27 -0400
commit8a25f0f8165604955933b84c81d5134a80a03e4e (patch)
treeece4c4c79afa9b9309fbf574c506939729078218 /server/src/apub/community.rs
parent33c5c21a576668f5eaf7d9fafb504f51a3331593 (diff)
Use an associated type instead of Generic.
Diffstat (limited to 'server/src/apub/community.rs')
-rw-r--r--server/src/apub/community.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs
index 920c41ad..05e004ee 100644
--- a/server/src/apub/community.rs
+++ b/server/src/apub/community.rs
@@ -5,7 +5,9 @@ pub struct CommunityQuery {
community_name: String,
}
-impl ToApub<GroupExt> for Community {
+impl ToApub for Community {
+ type Response = GroupExt;
+
// Turn a Lemmy Community into an ActivityPub group that can be sent out over the network.
fn to_apub(&self, conn: &PgConnection) -> Result<GroupExt, Error> {
let mut group = Group::default();
@@ -52,7 +54,9 @@ impl ActorType for Community {
}
}
-impl FromApub<GroupExt> for CommunityForm {
+impl FromApub for CommunityForm {
+ type ApubType = GroupExt;
+
/// Parse an ActivityPub group received from another instance into a Lemmy community.
fn from_apub(group: &GroupExt, conn: &PgConnection) -> Result<Self, Error> {
let oprops = &group.base.base.object_props;