Skip to content

impl FromStr for Ipv4Addr #397

Closed
Closed

Description

@AsafFisher

Is this required? I am thinking of moving the Parser here from the rust std...
What do you think?

Activity

  1. AsafFisher commented on Sep 8, 2022

    @AsafFisher
    ContributorAuthor
  2. sunfishcode commented on Sep 8, 2022

    @sunfishcode
    Member

    This only affects the no_std build, because in the std build, rustix's Ipv4Addr is just std::net::Ipv4Addr.

    I think the reason I put these in rustix for the no_std build rather than just using a crate like no-std-net is to make it easier for the port of std to rustix. Using a crate as a dependency of std requires some trickery, and I'm still not sure if I'm doing it right in rustix, so I'm not confident in submitting changes to third-party crates to do it. If porting the code from std is straightforward, that might be the best approach for now.

    This whole issue will hopefully go away in the future; rust-lang/rust#78802 hopefully opens up a path to moving these types into actual core, which should eliminate all these issues.

  3. sunfishcode commented on Jan 24, 2025

    @sunfishcode
    Member

    This is now fixed, as rustix's no_std mode now uses the (relatively) new core::net::Ipv4Addr, which supports FromStr.

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

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