Source code
Revision control
Copy as Markdown
Other Tools
//! Rules defined in [RFC 2234].
//!
use crate::parsing::ParsedItem;
/// Consume exactly one space or tab.
pub(crate) const fn wsp(input: &[u8]) -> Option<ParsedItem<'_, ()>> {
match input {
[b' ' | b'\t', rest @ ..] => Some(ParsedItem(rest, ())),
_ => None,
}
}