mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
Running fmt.
This commit is contained in:
parent
884ee2bbe1
commit
bb4794908b
2 changed files with 10 additions and 13 deletions
|
@ -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?)
|
||||
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?),
|
||||
}))
|
||||
}
|
||||
UserOrCommunity::Community(c) => {
|
||||
PersonOrGroup::Group(c.into_json(data).await?)
|
||||
}
|
||||
})),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -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?)
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue