]> git.proxmox.com Git - rustc.git/blob - vendor/time/src/parsing/combinator/rfc/rfc2234.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / vendor / time / src / parsing / combinator / rfc / rfc2234.rs
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 }