Skip to content

Everywhere in tide::Error that takes a StatusCode should take a TryInto<StatusCode> #649

@jbr

Description

@jbr

Detailed Description

Elsewhere in tide, interfaces that take a StatusCode also accept a numeric representation of that StatusCode. tide::Error interfaces do not yet.

Potentially, this could be broadened to a project-wide search for StatusCode and replacing it with impl TryInto<StatusCode> and .try_into().unwrap(). Or possibly using this 👇 and impl Into<StatusCode>

impl From<u16> for StatusCode {
    fn into(self: u16) -> StatusCode {
        self.try_into().unwrap()
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions