mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 05:19:21 +00:00
Improve code readability
This commit is contained in:
parent
9271623fd6
commit
bd272b2d36
@ -58,14 +58,14 @@ impl AccountExportAPI {
|
|||||||
friends_list: FriendAPI::from_list(&export.friends_list),
|
friends_list: FriendAPI::from_list(&export.friends_list),
|
||||||
groups: export.groups
|
groups: export.groups
|
||||||
.iter()
|
.iter()
|
||||||
.map(|g| groups_helper::get_info(g))
|
.map(groups_helper::get_info)
|
||||||
.collect::<Result<Vec<Group>, _>>()?
|
.collect::<Result<Vec<Group>, _>>()?
|
||||||
.iter()
|
.iter()
|
||||||
.map(|g| GroupApi::new(&g, curr_user_id.as_option()))
|
.map(|g| GroupApi::new(g, curr_user_id.as_option()))
|
||||||
.collect::<Result<Vec<GroupApi>, _>>()?,
|
.collect::<Result<Vec<GroupApi>, _>>()?,
|
||||||
users_info: export.get_related_users_ids()?
|
users_info: export.get_related_users_ids()?
|
||||||
.iter()
|
.iter()
|
||||||
.map(|u| user_helper::find_user_by_id(u))
|
.map(user_helper::find_user_by_id)
|
||||||
.collect::<Result<Vec<User>, _>>()?
|
.collect::<Result<Vec<User>, _>>()?
|
||||||
.iter()
|
.iter()
|
||||||
.map(|u| {
|
.map(|u| {
|
||||||
|
Loading…
Reference in New Issue
Block a user