Skip to content

Use ParseError::or when reporting a failure from line_ending #1264

@Lucretiel

Description

@Lucretiel

Currently, when line_ending fails, it returns ErrorKind::CrLf, same as crlf. In the interest of maximally helpful error reporting, I propose that line_ending instead return:

E::or(
    E::from_char(input.clone(), '\n'),
    E::from_error_kind(input, ErrorKind::CrLf),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions