1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-25 13:08:50 +00:00

Improve code readability

This commit is contained in:
Pierre HUBERT 2022-03-17 18:32:33 +01:00
parent 9271623fd6
commit bd272b2d36

View File

@ -58,14 +58,14 @@ impl AccountExportAPI {
friends_list: FriendAPI::from_list(&export.friends_list),
groups: export.groups
.iter()
.map(|g| groups_helper::get_info(g))
.map(groups_helper::get_info)
.collect::<Result<Vec<Group>, _>>()?
.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>, _>>()?,
users_info: export.get_related_users_ids()?
.iter()
.map(|u| user_helper::find_user_by_id(u))
.map(user_helper::find_user_by_id)
.collect::<Result<Vec<User>, _>>()?
.iter()
.map(|u| {