mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
fix warnings and bugs, noticed on nightly
This commit is contained in:
committed by
holger krekel
parent
a7bf05bebb
commit
baff13ecab
@@ -257,7 +257,8 @@ impl MimeMessage {
|
||||
self.parts[0].msg = "".to_string();
|
||||
|
||||
// swap new with old
|
||||
std::mem::replace(&mut self.parts[0], filepart);
|
||||
self.parts.push(filepart); // push to the end
|
||||
let _ = self.parts.swap_remove(0); // drops first element, replacing it with the last one in O(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user