Skip to content

"Index out of bounds" error where there are trailing spaces #13

@vrurg

Description

@vrurg

This is kind of a continuation to #12. With the following string used as test input:

    let src = r#"
app_dir: "$HOME/.var/app/foo"
logging:
    console:
        level: "debug"
    file:
        dest:
            path: "$HOME/.var/log/foo.log"
        options:
            pid: true

    "#;

I get the following error:

index out of bounds: the len is 187 but the index is 187

A workaround is to use src.trim_end() since the problem is in the trailing spaces before the "#.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions