This commit is contained in:
Robin Appelman 2024-11-27 21:16:27 +01:00
commit ef8c3b961d
10 changed files with 146 additions and 38 deletions

View file

@ -50,7 +50,7 @@ impl Display for RfcError {
impl Error for RfcError {}
/// Parse an rfc7239 header value into a list of forwarded nodes
pub fn parse(header_value: &str) -> impl Iterator<Item = Result<Forwarded, RfcError>> {
pub fn parse(header_value: &str) -> impl DoubleEndedIterator<Item = Result<Forwarded, RfcError>> {
header_value.split(',').map(str::trim).map(Forwarded::parse)
}