Use BTreeMap::keys instead of iter + map

This commit is contained in:
Jonas Platte 2022-09-24 11:37:16 +02:00
parent ac707e30f0
commit befed6370a
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -99,7 +99,7 @@ async fn run() -> Result<(), Box<dyn Error>> {
}
});
let invite_futures = response.rooms.invite.iter().map(|(room_id, _)| async move {
let invite_futures = response.rooms.invite.keys().map(|room_id| async move {
if let Err(err) = handle_invitations(http_client, matrix_client, room_id).await {
eprintln!("failed to accept invitation for room {room_id}: {err}");
}