diff --git a/crates/mailparsing/src/rfc5322_parser.rs b/crates/mailparsing/src/rfc5322_parser.rs index b0b6784c..00d6a019 100644 --- a/crates/mailparsing/src/rfc5322_parser.rs +++ b/crates/mailparsing/src/rfc5322_parser.rs @@ -1059,7 +1059,7 @@ fn resinfo(input: Span) -> IResult { .parse(input) } -fn methodspec(input: Span) -> IResult, String)> { +fn methodspec(input: Span) -> IResult, BString)> { context( "methodspec", map( @@ -1079,12 +1079,12 @@ fn methodspec(input: Span) -> IResult, String)> { // Taken from https://datatracker.ietf.org/doc/html/rfc8601 which says // that this is the same as the SMTP Keyword token -fn keyword(input: Span) -> IResult { +fn keyword(input: Span) -> IResult { context( "keyword", map( take_while1(|c: char| c.is_ascii_alphanumeric() || c == '+' || c == '-'), - |s: Span| s.to_string(), + |s: Span| (*s).into(), ), ) .parse(input)