Debian Codegraph @

third_party/rust/time/src/parsing/combinator/rfc/rfc2234.rs

raw
1 //! Rules defined in [RFC 2234].
2 //!
3 //! [RFC 2234]: https://datatracker.ietf.org/doc/html/rfc2234
4
5 use crate::parsing::ParsedItem;
6
7 /// Consume exactly one space or tab.
8 pub(crate) const fn wsp(input: &[u8]) -> Option<ParsedItem<'_, ()>> {
9 match input {
10 [b' ' | b'\t', rest @ ..] => Some(ParsedItem(rest, ())),
11 _ => None,
12 }
13 }