diff --git a/crates/apub/src/fetcher/search.rs b/crates/apub/src/fetcher/search.rs index 3a0c2fbd0..76c284820 100644 --- a/crates/apub/src/fetcher/search.rs +++ b/crates/apub/src/fetcher/search.rs @@ -122,14 +122,12 @@ impl Object for SearchableObjects { Ok(match self { SearchableObjects::Post(p) => SearchableKinds::Page(Box::new(p.into_json(data).await?)), SearchableObjects::Comment(c) => SearchableKinds::Note(c.into_json(data).await?), - SearchableObjects::PersonOrCommunity(pc) => SearchableKinds::PersonOrGroup(Box::new(match *pc { - UserOrCommunity::User(p) => { - PersonOrGroup::Person(p.into_json(data).await?) - } - UserOrCommunity::Community(c) => { - PersonOrGroup::Group(c.into_json(data).await?) - } - })), + SearchableObjects::PersonOrCommunity(pc) => { + SearchableKinds::PersonOrGroup(Box::new(match *pc { + UserOrCommunity::User(p) => PersonOrGroup::Person(p.into_json(data).await?), + UserOrCommunity::Community(c) => PersonOrGroup::Group(c.into_json(data).await?), + })) + } }) } 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 71db36128..c6a1bb17e 100644 --- a/crates/apub/src/fetcher/site_or_community_or_user.rs +++ b/crates/apub/src/fetcher/site_or_community_or_user.rs @@ -89,11 +89,10 @@ impl Object for SiteOrCommunityOrUser { SiteOrCommunityOrUser::Site(ApubSite::from_json(a, data).await?) } SiteOrPersonOrGroup::PersonOrGroup(a) => SiteOrCommunityOrUser::UserOrCommunity(match a { - PersonOrGroup::Person(p) => UserOrCommunity::User( - ApubPerson::from_json(p, data).await?, - ), - PersonOrGroup::Group(g) => - UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?), + PersonOrGroup::Person(p) => UserOrCommunity::User(ApubPerson::from_json(p, data).await?), + PersonOrGroup::Group(g) => { + UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?) + } }), }) }