Skip to content

Commit

Permalink
use unzip instead of collect
Browse files Browse the repository at this point in the history
  • Loading branch information
kibibytium committed Dec 11, 2024
1 parent c20f2a7 commit 42c77c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/node-mimimi/src/importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ impl ImportEssential {
) = importable_chunk
.into_iter()
.map(|mail| (mail.attachments, (mail.import_mail_data, mail.session_key)))
.collect();
.unzip();

for attachments_one_mail in attachments_per_mail {
if attachments_one_mail.len() > 0 {
let keyed_attachments: Vec<KeyedImportableMailAttachment> = attachments_one_mail
for attachments_next_mail in attachments_per_mail {
if attachments_next_mail.len() > 0 {
let keyed_attachments: Vec<KeyedImportableMailAttachment> = attachments_next_mail
.into_iter()
.map(|attachment| attachment.make_keyed_importable_mail_attachment(self))
.collect();
Expand Down

0 comments on commit 42c77c3

Please sign in to comment.