try 1
This commit is contained in:
parent
a7bd3c475a
commit
bb75c41f13
2 changed files with 3 additions and 3 deletions
|
@ -56,7 +56,7 @@ use nom::{combinator::into, IResult};
|
||||||
/// String::from_utf8_lossy(email.child.as_text().unwrap().body),
|
/// String::from_utf8_lossy(email.child.as_text().unwrap().body),
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
pub fn parse_message(input: &[u8]) -> IResult<&[u8], part::composite::Message> {
|
pub fn parse_message<'a>(input: &'a [u8]) -> IResult<&'a[u8], part::composite::Message<'a>> {
|
||||||
into(part::composite::message(mime::MIME::<
|
into(part::composite::message(mime::MIME::<
|
||||||
mime::r#type::DeductibleMessage,
|
mime::r#type::DeductibleMessage,
|
||||||
>::default()))(input)
|
>::default()))(input)
|
||||||
|
@ -99,6 +99,6 @@ pub fn parse_message(input: &[u8]) -> IResult<&[u8], part::composite::Message> {
|
||||||
/// imf.subject.unwrap().to_string(),
|
/// imf.subject.unwrap().to_string(),
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
pub fn parse_imf(input: &[u8]) -> IResult<&[u8], imf::Imf> {
|
pub fn parse_imf<'a>(input: &'a [u8]) -> IResult<&'a [u8], imf::Imf<'a>> {
|
||||||
imf::imf(input)
|
imf::imf(input)
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ pub enum MIMEWord<'a> {
|
||||||
Quoted(QuotedString<'a>),
|
Quoted(QuotedString<'a>),
|
||||||
Atom(&'a [u8]),
|
Atom(&'a [u8]),
|
||||||
}
|
}
|
||||||
impl Default for MIMEWord<'static> {
|
impl<'a> Default for MIMEWord<'a> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::Atom(&[])
|
Self::Atom(&[])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue