mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 04:41: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 {
|
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?)
|
|
||||||
}
|
|
||||||
})),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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?),
|
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue