Skip to content

Commit dc29455

Browse files
committed
Auto merge of #3850 - Turbo87:into, r=pietroalbini
controllers::crate_owner_invitation: Simplify `users` assignment The compiler already knows that we want a `Vec<EncodablePublicUser>` so we can use `.into()` instead :)
2 parents b40a141 + ec9c85d commit dc29455

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/controllers/crate_owner_invitation.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,7 @@ fn prepare_list(
229229

230230
Ok(PrivateListResponse {
231231
invitations,
232-
users: users
233-
.into_iter()
234-
.map(|(_, user)| EncodablePublicUser::from(user))
235-
.collect(),
232+
users: users.into_iter().map(|(_, user)| user.into()).collect(),
236233
meta: ResponseMeta { next_page },
237234
})
238235
}

0 commit comments

Comments
 (0)