summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index b5f0a92..3b59f19 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -785,7 +785,7 @@ pub fn parse_mail(raw_data: &[u8]) -> Result<ParsedMail, MailParseError> {
if result.ctype.mimetype.starts_with("multipart/") &&
result.ctype.params.get("boundary").is_some() && raw_data.len() > ix_body
{
- let boundary = String::from("--") + result.ctype.params.get("boundary").unwrap();
+ let boundary = String::from("--") + &result.ctype.params["boundary"];
if let Some(ix_body_end) = find_from_u8(raw_data, ix_body, boundary.as_bytes()) {
result.body = &raw_data[ix_body..ix_body_end];
let mut ix_boundary_end = ix_body_end + boundary.len();