diff options
Diffstat (limited to 'src/cmd/raw.rs')
-rw-r--r-- | src/cmd/raw.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/raw.rs b/src/cmd/raw.rs index a20eded..0a4df86 100644 --- a/src/cmd/raw.rs +++ b/src/cmd/raw.rs @@ -36,6 +36,7 @@ pub fn raw( .map(|x| x.parse()) .collect::<std::result::Result<Vec<usize>, std::num::ParseIntError>>() { + let mut s; let mut m = mail.parsed().unwrap(); if path[0] != 0 { @@ -56,8 +57,8 @@ pub fn raw( mime_path.to_owned(), ); } - let s: &'static _ = m.get_body_raw().unwrap().leak(); - m = mailparse::parse_mail(s).unwrap(); + s = m.get_body_raw().unwrap(); + m = mailparse::parse_mail(&s).unwrap(); } x if x.starts_with("multipart/") => { if *i >= m.subparts.len() { |