From: Felix Ableitner Date: Sat, 6 Nov 2021 14:01:00 +0000 (+0100) Subject: Remove unused ActorType methods X-Git-Url: http://these/git/%22https:/image.com/%7BcommunityRSSUrl%28?a=commitdiff_plain;h=02ce7bdc7d2df4fc2e5a0405496362faf31058ca;p=lemmy.git Remove unused ActorType methods --- diff --git a/crates/apub/src/fetcher/user_or_community.rs b/crates/apub/src/fetcher/user_or_community.rs index eccda7c6..5f7c388e 100644 --- a/crates/apub/src/fetcher/user_or_community.rs +++ b/crates/apub/src/fetcher/user_or_community.rs @@ -80,18 +80,10 @@ impl ApubObject for UserOrCommunity { } impl ActorType for UserOrCommunity { - fn is_local(&self) -> bool { - todo!() - } - fn actor_id(&self) -> Url { todo!() } - fn name(&self) -> String { - todo!() - } - fn public_key(&self) -> Option { match self { UserOrCommunity::User(p) => p.public_key(), diff --git a/crates/apub/src/objects/community.rs b/crates/apub/src/objects/community.rs index 35a19353..f6737a3a 100644 --- a/crates/apub/src/objects/community.rs +++ b/crates/apub/src/objects/community.rs @@ -161,15 +161,9 @@ impl ApubObject for ApubCommunity { } impl ActorType for ApubCommunity { - fn is_local(&self) -> bool { - self.local - } fn actor_id(&self) -> Url { self.actor_id.to_owned().into() } - fn name(&self) -> String { - self.name.clone() - } fn public_key(&self) -> Option { self.public_key.to_owned() } diff --git a/crates/apub/src/objects/person.rs b/crates/apub/src/objects/person.rs index 5f494b70..ea088321 100644 --- a/crates/apub/src/objects/person.rs +++ b/crates/apub/src/objects/person.rs @@ -178,15 +178,9 @@ impl ApubObject for ApubPerson { } impl ActorType for ApubPerson { - fn is_local(&self) -> bool { - self.local - } fn actor_id(&self) -> Url { self.actor_id.to_owned().into() } - fn name(&self) -> String { - self.name.clone() - } fn public_key(&self) -> Option { self.public_key.to_owned() diff --git a/crates/apub_lib/src/traits.rs b/crates/apub_lib/src/traits.rs index 18b33ba6..e5dcbc1e 100644 --- a/crates/apub_lib/src/traits.rs +++ b/crates/apub_lib/src/traits.rs @@ -63,9 +63,7 @@ pub trait ApubObject { /// Common methods provided by ActivityPub actors (community and person). Not all methods are /// implemented by all actors. pub trait ActorType { - fn is_local(&self) -> bool; fn actor_id(&self) -> Url; - fn name(&self) -> String; // TODO: this should not be an option (needs db migration in lemmy) fn public_key(&self) -> Option;