From a7bd3c475a58e42b86c163ec075ce01ddae7e60a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 18 Sep 2023 18:08:07 +0200 Subject: [PATCH] fix mime() method --- src/part/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/part/mod.rs b/src/part/mod.rs index 9171fe0..20a932d 100644 --- a/src/part/mod.rs +++ b/src/part/mod.rs @@ -17,7 +17,7 @@ use nom::{ }; use crate::mime; -use crate::mime::AnyMIME; +use crate::mime::{AnyMIME, NaiveMIME}; use crate::part::{ composite::{message, multipart, Message, Multipart}, discrete::{Binary, Text}, @@ -58,7 +58,7 @@ impl<'a> AnyPart<'a> { _ => None, } } - pub fn mime(self) -> &NaiveMIME<'a> { + pub fn mime(&self) -> &NaiveMIME<'a> { match self { Self::Mult(v) => &v.mime.fields, Self::Msg(v) => &v.mime.fields,