Remove redundant calls to .into_iter()

This commit is contained in:
Jonas Platte
2021-12-27 14:21:46 +01:00
parent 1a7baf631e
commit fea80843eb
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ impl BackupMachine {
let mut session_record: BTreeMap<Box<RoomId>, BTreeMap<String, BTreeSet<String>>> =
BTreeMap::new();
for session in sessions.into_iter() {
for session in sessions {
let room_id = session.room_id().to_owned();
let session_id = session.session_id().to_owned();
let sender_key = session.sender_key().to_owned();
@@ -223,7 +223,7 @@ impl OutboundGroupSession {
"Marking to-device request carrying a room key as sent"
);
for (user_id, info) in r.into_iter() {
for (user_id, info) in r {
self.shared_with_set.entry(user_id).or_insert_with(DashMap::new).extend(info)
}
@@ -289,11 +289,11 @@ impl GroupSessionManager {
changed_sessions.push(session);
}
for (user, device_messages) in message.into_iter() {
for (user, device_messages) in message {
messages.entry(user).or_insert_with(BTreeMap::new).extend(device_messages);
}
for (user, infos) in share_info.into_iter() {
for (user, infos) in share_info {
share_infos.entry(user).or_insert_with(BTreeMap::new).extend(infos);
}
}
@@ -185,7 +185,7 @@ impl SessionManager {
for user_id in users {
let user_devices = self.store.get_readonly_devices_filtered(user_id).await?;
for (device_id, device) in user_devices.into_iter() {
for (device_id, device) in user_devices {
if !device.algorithms().contains(&EventEncryptionAlgorithm::OlmV1Curve25519AesSha2)
{
warn!(