From 51d5439f59059bea46b8480d2457e5e24cac8fa1 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 27 Jul 2024 16:09:39 -0400 Subject: [PATCH] Update crates/apub/src/fetcher/site_or_community_or_user.rs Thanks, I like that better. Co-authored-by: dullbananas --- crates/apub/src/fetcher/site_or_community_or_user.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/apub/src/fetcher/site_or_community_or_user.rs b/crates/apub/src/fetcher/site_or_community_or_user.rs index 252d31ce3..71db36128 100644 --- a/crates/apub/src/fetcher/site_or_community_or_user.rs +++ b/crates/apub/src/fetcher/site_or_community_or_user.rs @@ -88,14 +88,13 @@ impl Object for SiteOrCommunityOrUser { SiteOrPersonOrGroup::Instance(a) => { SiteOrCommunityOrUser::Site(ApubSite::from_json(a, data).await?) } - SiteOrPersonOrGroup::PersonOrGroup(a) => match a { - PersonOrGroup::Person(p) => SiteOrCommunityOrUser::UserOrCommunity(UserOrCommunity::User( + SiteOrPersonOrGroup::PersonOrGroup(a) => SiteOrCommunityOrUser::UserOrCommunity(match a { + PersonOrGroup::Person(p) => UserOrCommunity::User( ApubPerson::from_json(p, data).await?, - )), - PersonOrGroup::Group(g) => SiteOrCommunityOrUser::UserOrCommunity( - UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?), ), - }, + PersonOrGroup::Group(g) => + UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?), + }), }) } }