Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl FromStr for Ipv4Addr #397

Open
AsafFisher opened this issue Sep 8, 2022 · 2 comments
Open

impl FromStr for Ipv4Addr #397

AsafFisher opened this issue Sep 8, 2022 · 2 comments

Comments

@AsafFisher
Copy link
Contributor

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

@AsafFisher
Copy link
Contributor Author

@sunfishcode
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants