rustix
rustix copied to clipboard
`impl FromStr for Ipv4Addr`
Is this required? I am thinking of moving the Parser here from the rust std... What do you think?
Maybe use https://docs.rs/no-std-net/latest/no_std_net/struct.Ipv4Addr.html ?
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; https://github.com/rust-lang/rust/pull/78802 hopefully opens up a path to moving these types into actual core, which should eliminate all these issues.