Skip to content

Add a way to parse IP addresses without having to utf8-validate #94821

Closed

Description

The only standard way I've found to parse an IP address is IpAddr::from_str. That function immediately converts the string to bytes:

Parser { state: input.as_bytes() }

It would be great to expose some way (not necessarily Parser::new, but something similar) that doesn't require doing unnecessary utf8 validation.

@rustbot label: +T-libs +C-enhancement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions