Merge commit 'f6bdf30'

This commit is contained in:
2023-12-05 09:56:55 -08:00
2 changed files with 11 additions and 25 deletions

View File

@@ -313,8 +313,6 @@ impl QueryRoot {
.exists();
let mut messages = Vec::new();
for (path, id) in std::iter::zip(nm.files(&thread_id)?, nm.message_ids(&thread_id)?) {
let path = path?;
let id = id?;
info!("{id}\nfile: {path}");
let file = File::open(&path)?;
let mmap = unsafe { MmapOptions::new().map(&file)? };
@@ -481,6 +479,9 @@ fn extract_related(m: &ParsedMail) -> Result<Body, Error> {
Err("extract_related".into())
}
// TODO(wathiede): make this walk_attachments that takes a closure.
// Then implement one closure for building `Attachment` and imlement another that can be used to
// get the bytes for serving attachments of HTTP
fn extract_attachments(m: &ParsedMail) -> Result<Vec<Attachment>, Error> {
let mut attachements = Vec::new();
for sp in &m.subparts {