Inline trivial single-use function

This commit is contained in:
Dirkjan Ochtman 2023-06-29 13:27:37 +02:00
parent 3330c186b2
commit 11a63a07d1
2 changed files with 1 additions and 7 deletions

View File

@ -445,7 +445,7 @@ where
}
&TimezoneName => {
try_consume!(scan::timezone_name_skip(s));
try_consume!(Ok((s.trim_start_matches(|c: char| !c.is_whitespace()), ())));
}
&TimezoneOffsetColon

View File

@ -365,12 +365,6 @@ pub(super) fn timezone_offset_2822(s: &str) -> ParseResult<(&str, Option<i32>)>
}
}
/// Tries to consume everything until next whitespace-like symbol.
/// Does not provide any offset information from the consumed data.
pub(super) fn timezone_name_skip(s: &str) -> ParseResult<(&str, ())> {
Ok((s.trim_start_matches(|c: char| !c.is_whitespace()), ()))
}
/// Tries to consume an RFC2822 comment including preceding ` `.
///
/// Returns the remaining string after the closing parenthesis.