Skip to content

PointerBuf::parse accepts Into<String> but does not include the String in the Err #96

Closed
@chanced

Description

@chanced

We likely take ownership of the input to PointerBuf::parse but do not include it in resulting ParseError.

PointerBuf::parse:

pub fn parse(s: impl Into<String>) -> Result<Self, ParseError> {
    let s = s.into();
    validate(&s)?;
    Ok(Self(s))
}

ParseError:

pub enum ParseError {
    NoLeadingBackslash,
    InvalidEncoding {
        offset: usize,
        source: InvalidEncodingError,
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions