~soywod/pimalaya

email-lib: elide the lifetime on maybe_quoted_const_val v1 APPLIED

Perma Alesheikh: 1
 elide the lifetime on maybe_quoted_const_val

 1 files changed, 1 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~soywod/pimalaya/patches/49342/mbox | git am -3
Learn more about email & git

[PATCH email-lib] elide the lifetime on maybe_quoted_const_val Export this patch

This should simplify the API. And does essentially the same thing.

Signed-off-by: Perma Alesheikh <me@prma.dev>
---
 mml/src/message/body/compiler/parsers/vals.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mml/src/message/body/compiler/parsers/vals.rs b/mml/src/message/body/compiler/parsers/vals.rs
index fe15b92..b4f2e3f 100644
--- a/mml/src/message/body/compiler/parsers/vals.rs
+++ b/mml/src/message/body/compiler/parsers/vals.rs
@@ -46,9 +46,7 @@ pub(crate) fn quoted_val<'a>() -> impl Parser<'a, &'a str, Val<'a>, ParserError<
///
/// It parses either the given const value or the quoted version of
/// it.
pub(crate) fn maybe_quoted_const_val<'a>(
    val: &'a str,
) -> impl Parser<'a, &'a str, Val<'a>, ParserError<'a>> + Clone {
pub(crate) fn maybe_quoted_const_val(val: &str) -> impl Parser<&str, Val, ParserError> + Clone {
    choice((
        just(val).to_slice().delimited_by(dquote(), dquote()),
        just(val).to_slice(),
-- 
2.43.0