summaryrefslogtreecommitdiffstats
path: root/server/src/apub/user.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/user.rs
parent33c5c21a576668f5eaf7d9fafb504f51a3331593 (diff)
Use an associated type instead of Generic.
Diffstat (limited to 'server/src/apub/user.rs')
-rw-r--r--server/src/apub/user.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/src/apub/user.rs b/server/src/apub/user.rs
index 03492f70..274c70a9 100644
--- a/server/src/apub/user.rs
+++ b/server/src/apub/user.rs
@@ -5,7 +5,9 @@ pub struct UserQuery {
user_name: String,
}
-impl ToApub<PersonExt> for User_ {
+impl ToApub for User_ {
+ type Response = PersonExt;
+
// Turn a Lemmy Community into an ActivityPub group that can be sent out over the network.
fn to_apub(&self, _conn: &PgConnection) -> Result<PersonExt, Error> {
// TODO go through all these to_string and to_owned()
@@ -50,7 +52,8 @@ impl ActorType for User_ {
}
}
-impl FromApub<PersonExt> for UserForm {
+impl FromApub for UserForm {
+ type ApubType = PersonExt;
/// Parse an ActivityPub person received from another instance into a Lemmy user.
fn from_apub(person: &PersonExt, _conn: &PgConnection) -> Result<Self, Error> {
let oprops = &person.base.base.object_props;