Running fmt.

This commit is contained in:
Dessalines 2024-07-27 16:36:05 -04:00
parent 884ee2bbe1
commit bb4794908b
2 changed files with 10 additions and 13 deletions

View file

@ -122,14 +122,12 @@ impl Object for SearchableObjects {
Ok(match self { Ok(match self {
SearchableObjects::Post(p) => SearchableKinds::Page(Box::new(p.into_json(data).await?)), SearchableObjects::Post(p) => SearchableKinds::Page(Box::new(p.into_json(data).await?)),
SearchableObjects::Comment(c) => SearchableKinds::Note(c.into_json(data).await?), SearchableObjects::Comment(c) => SearchableKinds::Note(c.into_json(data).await?),
SearchableObjects::PersonOrCommunity(pc) => SearchableKinds::PersonOrGroup(Box::new(match *pc { SearchableObjects::PersonOrCommunity(pc) => {
UserOrCommunity::User(p) => { SearchableKinds::PersonOrGroup(Box::new(match *pc {
PersonOrGroup::Person(p.into_json(data).await?) UserOrCommunity::User(p) => PersonOrGroup::Person(p.into_json(data).await?),
} UserOrCommunity::Community(c) => PersonOrGroup::Group(c.into_json(data).await?),
UserOrCommunity::Community(c) => { }))
PersonOrGroup::Group(c.into_json(data).await?) }
}
})),
}) })
} }

View file

@ -89,11 +89,10 @@ impl Object for SiteOrCommunityOrUser {
SiteOrCommunityOrUser::Site(ApubSite::from_json(a, data).await?) SiteOrCommunityOrUser::Site(ApubSite::from_json(a, data).await?)
} }
SiteOrPersonOrGroup::PersonOrGroup(a) => SiteOrCommunityOrUser::UserOrCommunity(match a { SiteOrPersonOrGroup::PersonOrGroup(a) => SiteOrCommunityOrUser::UserOrCommunity(match a {
PersonOrGroup::Person(p) => UserOrCommunity::User( PersonOrGroup::Person(p) => UserOrCommunity::User(ApubPerson::from_json(p, data).await?),
ApubPerson::from_json(p, data).await?, PersonOrGroup::Group(g) => {
), UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?)
PersonOrGroup::Group(g) => }
UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?),
}), }),
}) })
} }