remove extra conversion

This commit is contained in:
yggverse 2025-01-18 02:38:32 +02:00
parent c5aada49b4
commit edf9982933

View file

@ -44,7 +44,7 @@ impl Mime {
return Ok(None); return Ok(None);
} }
match parse(s) { match parse(s) {
Some(v) => Ok(Some(Self(v.to_lowercase()))), Some(v) => Ok(Some(Self(v))),
None => Err(Error::Undefined), None => Err(Error::Undefined),
} }
} }
@ -66,5 +66,5 @@ pub fn parse(s: &str) -> Option<String> {
RegexMatchFlags::DEFAULT, RegexMatchFlags::DEFAULT,
) )
.get(1) .get(1)
.map(|this| this.to_string()) .map(|this| this.to_lowercase())
} }